This tutorial covers the following topics:
Why should you redirect your URLs to www
To use the CDN service and to always have your website served from the closest location to your visitors your website always has to redirect to WWW URLs. If your website is currently not configured this way we strongly recommend that you reconfigure it.
How to do it automatically
You can automatically redirect your website to open via www from the CloudFlare tool itself. If you have already enabled CloudFlare you'll need to deactivate it first. Note that if you're using Cloudflare Plus, you must not deactivate it as this will cancel the service and you will have to order it again.
To apply the redirect to www, first click the Activate button next to the entry for the desired domain name.
Provide your email address if prompted to and on the next popup you will see a message asking you to confirm if you would like to have your website automatically redirected to www.
Simply click the Yes button and a redirect to www will automatically be placed in the server configuration for your domain name.
How to reconfigure manually
If you are using Cloudflare PLUS, or an application that is not automatically configurable by our tool, you can configure your website manually to always redirect its visitors to URLs with www and thus always be served through the Cloudflare network. For more information on how to do that, you can check our article on How to redirect non-www URLs to www.
Additionally, some applications like WordPress, Magento, Prestashop etc. need additional configuration. For more information on specific apps, check out these tutorial pages: