Redirecting www to domain apex
To do this:
- Log in to the , and select your account and website.
- Go to DNS.
- Create a DNS record for the
wwwsubdomain. It must either be an
Arecord with the
192.0.2.1value or an
AAAArecord with the
100::value. The new DNS record must also have Cloudflare’s proxy enabled (orange-clouded) so that it can enact the Page Rule behavior that you will create next.
- Next, go to Account Home > Bulk Redirects > Create a new Bulk Redirects list > Create new list.
- In the content type, select Redirect.
- Add your redirect Source URL and Target URL. Your target URL must include
https://before the apex domain.
- Select Edit parameters > select Preserve query string, Subpath matching and Preserve path suffix.
- Select Add to list.
- Go to Bulk Redirects > Create Bulk Redirects > select your list > Save and Deploy.
To test that your redirect worked, go to the Target URL and double-click the URL as if to copy it. If the URL does not display
www, your change has successfully propagated.