Redirect a "naked" domain with SSL

All domains are setup using domain name records, you add these using your domain name providers control panel. Sadly going through every possible domain registrar's specific DNS management interface is to much for this tutorial, so if you have questions ask your domain registrar for help.

A naked domain is simply a domain without a sub-domain such as www, let's take a look at an example.

When you type into your browser http://google.com or google.com you end up on http://google.com, this domain is known as a "naked" domain or root domain. It is a domain without anything added to it.

The main problem people face with solutions such as Platform.sh, Google App Engine, Amazon S3, etc is they all require a CNAME record to work.

CNAME records cannot exist as a root domain record (a record for your naked domain), a few providers came up with different solutions, ALIAS, APEX, CNAME flattening that allow you to do this, but they are additions or hacks on top of the normal DNS system.

So when you add your custom domain to these services you end up adding something like www.domain.com which you create a CNAME record in your DNS control panel for. All is well...

But then you notice that when people go to http://domain.com they don't end up on your new fancy website.

Some services have A records to add to your naked/root domain that point to a load balancer or something similar, however they always tell you not to do that.

At the end of the day, what you want is for https://domain.com to go to your new fancy https://www.domain.com website. This is where redirectssl comes in, you can use it to do exactly what you want.

Start by logging into your account and clicking "Add domain", now you will enter domain.com as the domain and www.domain.com as the redirect (this is done by default). You will want to make sure 301 Permanant redirect is selected, and Pass query parameters. Once that is done click Add domain.

You are now given an IP address, this is your root A record IP. Go back to your DNS records and add a A record (or update if it already exists) setting the host to @ and the IP address to this IP.

Wait for up to 24 hours for the DNS to propagate throughout the internet and give it a try, everything will fully work as expected.

Sit back and watch your traffic fly!

Ready to dive in?
Start your free trial today.

Recent guides

We can handle any service you use, need help integrating it let us know by contacting support.

Heroku Guide

How to setup your root domain with SSL on Heroku

Platform.sh Guide

How to setup your root domain with SSL on Platform.sh

Netlify Guide

How to setup your root domain with SSL on Heroku

Naked Domain Guide

How to redirect a naked domain with SSL

Google App Engine Guide

How to setup your root domain with SSL on Google App Engine

Now.sh Guide

How to setup your root domain with SSL on Now.sh

Wix Guide

How to setup your root domain with SSL on Wix

GoDaddy Guide

How to setup your root domain with SSL on GoDaddy

© 2020 redirectssl. All rights reserved.

API documentation Terms of Service Privacy Policy