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.

Setup

We recommend a method of setting up a free account using CloudFlare to setup a redirect between your root and www domain.

  1. Visit cloudflare.com and sign up your domain for a free account

  2. Follow the cloudflare.com setup to configure your domain

  3. 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

Rules
  1. Next click Page Rules
Edit rules
  1. Then Create new page rule
Create Rules
  1. 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:
  • URL: mixotest.com/*

  • Setting: Forwarding URL with 301 redirect

  • Destination URL: www.mixotest.com/$1

  1. Click Save and Deploy Page Rule
Save and deploy
  1. 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.

User avatarUser avatarUser avatarUser avatarUser avatarUser avatarUser avatarUser avatarUser avatarUser avatarUser avatarUser avatarUser avatar

Join our community of makers turning their ideas into startups.

“ I was creating many websites before using Wordpress and Joomla. Nothing was as fast as Mixo. The help with AI, the templates and automated guess what is good to present the brand is awesome. ” - Alexander Horvath