Redirect the www to non-www

Hi @clickuplocal

To redirect www to non-www through Cloudflare, you’ll need to set up a page rule do this,

  1. Visit the Cloudflare dashboard and select your domain.
  2. Click on the ‘Page Rules’ tab.
  3. Click on ‘Create Page Rule’.
  4. In the ‘If the URL matches’ field, input www.yourdomain.com/*.
  5. Select ‘Forwarding URL’ under ‘Then the settings are’, and choose a 301 (Permanent Redirect) status.
  6. In the ‘Enter destination URL’ field, input https://yourdomain.com/$1.
  7. Click ‘Save and Deploy’ to create the rule.

The www part of the domain will now be automatically redirected to the non-www version.

The screen shots are a bit old, but you can see what this looks like if you click Archive on this older Tutorial Deprecated - Redirect www.example.com to example.com

7 Likes