Why is it so difficult to set up a simple 301 redirect?

Answer these questions to help the Community help you get started.

What is the domain name?
bellwetherindia.com

Have you searched for an answer?
YES

Please share your search results url:
https://developers.cloudflare.com/support/page-rules/configuring-url-forwarding-or-redirects-with-page-rules/

When you tested your domain, what were the results?
URL redirect does not work. throws a 404

Describe the issue you are having:
I have a url "

https:// www.bellwetherindia.com/gdpr-compliance-consulting-checklist.html

" that is indexed on google page#1. Now, unfortunately, I have chosen hostinger as my new website hosting provider. Their systems do not allow .html extension for pages. So, the page now has a new url that looks like this - https:// bellwetherindia.com/general-data-protection-regulation.

Now, when I click on google search results link, my website is throwing a 404 error since the old URL no longer exists on the new hosting provider. Hostinger support pointed me to sign-up for cloudflare and perform some steps (add cname records and then add redirect). I have perfromed those steps and could not get this working.

What error message or number are you receiving?
404

What steps have you taken to resolve the issue?

  1. tried creating ‘single redirects’ as follows - IF, URI path Equals “/gdpr-compliance-consulting-checklist.html” THEN static redirect to “https:// bellwetherindia.com/general-data-protection-regulation

Was the site working with SSL prior to adding it to Cloudflare?
YES, it works fine and redirects to HTTPS when I type in HTTP

What are the steps to reproduce the error:

  1. Just open this url to see 404 - https:// bellwetherindia.com/gdpr-compliance-consulting-checklist.html

Have you tried from another browser and/or incognito mode?
YES

Setting up a simple 301 redirect is actually pretty simple. But your domain must be direct traffic to Cloudflare for it to work.

From the document link you quoted above:

Page Rule subdomains require an “Orange Clouded” DNS record for the Page Rule to work. Page Rules won’t apply to subdomains that don’t exist in DNS or aren’t being directed to Cloudflare.

The documentation for Single Redirects is also clear:

Single Redirects require that the incoming traffic for the hostname referenced in visitors’ requests is proxied by Cloudflare.

The rule you created seems fine. Check your DNS records and make sure you’re actually redirecting from a hostname that is :orange: proxied by Cloudflare.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.