I want to redirect example.com domain to www.example.com

I want to redirect https://pumpartners.com domain to https://www.pumpartners.com domain. I have added the following page redirects and DNS records but it’s still not working:

Those DNS records are set if you were redirecting https://www.pumpartners.com to https://pumpartners.com. You need to set the CNAME for www and AAAA 100:: for @. (The dummy DNS record is for the hostname you are redirecting from).

The redirect or page rule seems correct…

curl -I https://pumpartners.com
HTTP/2 301
date: Mon, 18 Mar 2024 17:50:24 GMT
location: https://www.pumpartners.com/
cache-control: max-age=3600
expires: Mon, 18 Mar 2024 18:50:24 GMT
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=GnMAqE%2BgpTCwgAquc9BRxNvxPFFyjWIP94k8KD%2F3SFHiawfIlAVkQkQt7InDPUFLNKjpsDdxqE%2F3c40RZfFvDe%2BSBQaq2qGHu90%2FRNQCtHfKj5u0VXCDd7i394AwfGWpxAp1jeRbr7ACQaIicAs%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 8667109a88b9459a-LHR
alt-svc: h3=":443"; ma=86400
1 Like

I have added the following CNAME records:
Name: www
Target: pumpartners.com

When I add AAAA record it gives me the below error.
A CNAME record with that host already exists. For more details, refer to https://developers.cloudflare.com/dns/manage-dns-records/troubleshooting/records-with-same-name/. (Code: 81054)

If this is for a Pages site, don’t add the CNAME by hand. It is added automatically when you add www.pumpartners.com as a Pages custom domain.

You want to redirect pumpartners.com to www.pumpartners.com, you need to remove pumpartners.com from the Pages custom domains and add the dummy AAAA record to the DNS by hand.

2 Likes

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