If you possess an alternate domain solely redirecting traffic to another domain, Cloudflare allows you to configure redirects directly within its interface.
The initial step involves incorporating your alias domain (e.g., previous.com) into Cloudflare.
Ensure your alias domain features a proxied DNS A or CNAME record, correctly resolving DNS queries. It might be prudent to include a record for the www subdomain as well.
Type | Name | IPv4 address | Proxy status |
---|---|---|---|
A | @ | 192.0.2.1 | Proxied |
A | www | 192.0.2.1 | Proxied |
Leverage Bulk redirects to direct traffic from your alias domain to the desired destination. Opt for “Include subdomains” and “Subpath matching” to encompass your entire alias domain (e.g., www.previous.com and www.previous.com/examples).
Source URL | Target URL | Status | Selected parameters |
---|---|---|---|
previous.com | https://new.com | 301 | Include subdomains and Subpath matching |
This setup facilitates the seamless forwarding of traffic from your alias domain to the designated primary domain, ensuring a comprehensive coverage of subdomains and subdirectories within the redirect process.