How to redirect www with cloudflare

Today, 27th January 2023, Ukraine is still bravely fighting for democratic values, human rights and peace in whole world. Russians ruthlessly kill all civilians in Ukraine including childs and destroy their cities. We are uniting against Putinโ€™s invasion and violence, in support of the people in Ukraine. You can help by donating to Ukrainian's army.

First of all, go to DNS settings

DNS section in Cloudflare

add www CNAME to root domain (you can specify @ and it will be replaced by domain after save), red fields are important:

Add CNAME www in Clodflare

Of course, replace with your domain (this is an example).

Go to page rules:

Page Rules in Cloudflare

Create a new one:

Page rule

Again, replace with your domain.

Force always using HTTPS

Another handy setting that is obviously a must is forcing HTTPS everywhere

SSL/TLS setting in Cloudflare

Always use HTTPS:

HTTPS enforcement in Cloudflare

Ivan Borshchov profile picture
Mar 12, 2021
by Ivan Borshchov
Did it help you?
Yes !