How to add or remove www in your site URL?

After the site is white labelled with Cloudflare, the URL created is https://youracademyname.com. As such, you could also add www in the URL should you choose. In this article, you will learn how to add a www in the URL or remove it, if it already exists.

This is achieved through URL redirection. Hence, there can be two scenarios:

  1. Redirect from non-www URL to www
  2. Redirect from www to non-www 

If you’re using your custom domain, you must have access to the Cloudflare account, you can take advantage of Cloudflare's Page Rules there to implement redirection. Here's how you can achieve this:

Redirect from non-www URL to www

  • Log in to your Cloudflare Account
  • Select site where you want to put the redirection
  • Go to Page Rules Tab
  • Create a New Rule
  • Enter the URL and select setting as “Forwarding URL*
  • Select the status code 301 (preferred and if you want it permanently)
  • Enter the target for this URL to redirect, refer to the screenshot above
  • Click “Save” and it’s deployed
  • After saving, you need to make sure the rule is ON

Redirect from a www URL to non-www

Redirect from a www URL to non-www

    • Log in to your Cloudflare Account
    • Select site where you want to implement the redirection
    • Go to Page Rules Tab
    • Create a New Rule
    • Enter the URL and select setting as “Forwarding URL*
    • Select the status code 301 (preferred and if you want it permanently)
    • Enter the target for this URL to redirect, refer to the screenshot above
    • Click “Save” and it’s deployed
    • After save, you need to make sure the rule is ON

    With the above steps, you’re ready to redirect everything from https://www.yourdomain.com to https://yourdomain.com and vice versa. You can open your site in incognito & check the site redirection now. In case of any queries, you can raise a customer support ticket by clicking here.