Let’s take a closer look at how to create permanent redirect links using Cloudflare. Our Server Management Services at Skynats can provide you with a thorough tutorial on how to proceed.
A 301 indicates that a URL has been permanently redirected from one to another. This implies that visitors who request the old URL will be redirected to the new URL.
A 301 redirect is most frequently used when a page has been removed or permanently moved from a website and moves all ranking power from the old URL to the new URL. With Cloudflare, a user can configure and control the ongoing redirection of links.
301 Moved Permanently :
Redirecting the requested site’s URL permanently. Now that the target resource has a new, permanent URI, any upcoming references to it should use one of the URIs that are included.
These responses can be generated by Cloudflare, so there is no need to use Page rules to make a request to the origin server’s response. In conclusion, Cloudflare enables users to set up URLs for permanent redirects.
To accomplish this, add a DNS record for the www subdomain. The value must be either 192.0.2.1 or an AAAA record containing a value 100::.
To execute the Page Rule action that you will define in the following steps, the newly created DNS record must also have Cloudflare’s proxy enabled (orange-clouded).
Then, create the Page rule for permanent link redirection with Cloudflare. The Page Rule that will handle the redirect. As a result, all pathways will be redirected.
A 301 is used to accomplish this (Permanent Redirect). By matching all paths, the visitor will be redirected to iab1234cd.com/blog/category/example from www.ab1234cd.com/blog/category/example.
Follow the instructions below to modify the Cloudflare rule for permanent link redirects:
- Go to the Cloudflare dashboard’s Rules section.
- Select Create Page Rule.
- Choose www.ab1234cd.com/* as the target, where /* matches all paths.
- Choose 301 – Permanent Redirect from the status code field and Forwarding URL from the drop-down menu.
- Lastly, modify the Forwarding URL address to read https://example.com/$1, with the wildcard match in target (the *) replacing the $1.
To complete the process of redirecting permanent links with Cloudflare, click Save and Deploy page rule and then wait for the rule to take effect.