How to redirect the root domain to my www with CloudFlare?
Redirecting your root domain to www means that when someone goes to your website without typing “www” in front of it, they will still be taken to the website. To do this, you need to change the settings on your domain registrar. First, you need to go to the place where your domain was purchased. Depending on who you host your website with, this might be a company like GoDaddy or Bluehost, or it might be somewhere else. Once you’re there, look for the settings that allow you to change how your website works. Look for a setting that says something about redirecting your root domain to www. If you can’t find it, you might need to contact the people who provide your website hosting and ask them how to do it. Once you find it, just turn it on and your root domain will be redirected to www.
All Mixo sites use CNAMEs which require mapping to your www (or another subdomain). If you are wanting your root domain to point to your Mixo site, the best way to do this is to create a masking / forwarding rule.
Note: Before proceeding, make sure you have setup your custom domain and it successfully loads your Mixo site on your www subdomain.
We recommend a method of setting up a free account using CloudFlare to setup a redirect between your root and www domain.
Visit cloudflare.com and sign up your domain for a free account
Follow the cloudflare.com setup to configure your domain
Next, we are going to setup a page rule which will point your root to your www. Go to the domain you have setup and click on Rules in the side bar
- Next click Page Rules
- Then Create new page rule
- Here is where you are going to create the redirect. For example, if I wanted to redirect my domain mixotest.com to www.mixotest.com, I would enter the following setup:
Setting: Forwarding URL with 301 redirect
Destination URL: www.mixotest.com/$1
- Click Save and Deploy Page Rule
Troubleshooting note: If you are still not having any luck redirecting your root domain (ie when you go to the root domain and it just sits there loading forever), you may need to create an A record for you root domain and point it to a dummy IP. To do this, you will need to create an A record for the root (use @ as the name) with a random address - eg 192.168.0.1.
Join our community of makers turning their ideas into startups.
“ I was able to create an amazing website within five minutes. Everything was done for me, with just minor input from me. Truly amazing! ” - Dianne De Costa