World Wide Web

How To Resolve Domain to WWW on Cloudflare

July 2, 2022 0 By Madole Labs

We'd love it if you SHARED this article with others!

Cloudflare has provided many features in order to better secure the world wide web. By hosting your domain’s DNS with them you can take advantage of some of their free functionality to provide your website visitors with a more secure experience while visiting your site. It may not be all that intuitive, however, to have any requests to your domain redirect to the www setting. This blog post will step you through how to resolve your domain to www on Cloudflare.

Pre-requisites to Resolving to WWW

I will assume that if you are reading this article, you already have a domain name registered, and the nameservers have been set to Cloudflare. This means your registrar does not have to be Cloudflare, but your domain’s nameservers do. If you do not have your domain’s nameservers hosted by, or pointing to Cloudflare, you will need to sign up for free with them, and add your site. Assuming you have completed this, please continue on.

Steps to Resolve Domain to WWW on Cloudflare

The following steps will guide you through what it would take to redirect madolelabs.com to www.madolelabs.com every time.

Step 1. Log into Cloudflare, and select your domain from the Home screen.

screen1

Step 2. Click DNS on the left bar, and ensure you have ‘A’ records defined for ‘www’ and ‘@’.

How To Resolve Domain to WWW on Cloudflare

Step 3. Click Rules on the left bar. It is about two-thirds of the way to the bottom. The page will be blank unless you have previously created rules for your domain.

screenshot3
Image showing Step 3 & Step 4.

Step 4. Click the Create Page Rule button.

Step 5. In the URL (required) field, enter in your domain name followed by a forward slash and the asterisk. Ensure to predicate it with http:// or https://. If you are using SSL with Cloudflare, you should enter in https://.

screenshot4

Step 6. In the Pick a Setting (required) field, click the dropdown and select Forwarding URL. A new dropdown will appear to the right called Select status code (required). Choose 301 – Permanent Redirect. In the Enter destination URL (required) field, enter the URL predicated with https://www.

screenshot5

Step 7. Click Save Page Rule. That’s it. The permanent redirect will take effect immediately.

Madole Labs Icon

We appreciate you visiting Madole Labs as your trusted source of how-to’s. If you have any questions, please leave them in the comments section below.