FAQs

Tutorial: Redirect your naked domain with SSL on HostGator

HostGator is probable the most known low-cost hosting service. But low cost does not mean easy to use, so sometimes it can get tricky – especially when it comes to linking your naked domains. That's why we have created this guide: to help you redirect your domain.

Step 01: Where does your www domain point to?

CNAME records for naked domain redirection

What happens when you visit "www.yourdomain.com"? If that shows your website, then you can probably jump straight away to the next step. If that throws an error, then the first step is to make your "www" domain show your website. To do that, login into your domain registrar and add an A Record on "www" pointing to the IP from HostGator.

Step 02: Root domain SSL redirection

Watch out! The next steps are tedious and a bit more complicated, and can result in leaving your website offline. We built NakedSSL precisely to avoid dealing with that. Find out if NakedSSL can help you with this.

Enter your naked domain to see if we can help:

We can't redirect your domain. Check your URL again and ensure you have a SSL certificate installed. These guides get you started:

https://

You need to have a valid SSL certificate for your naked domain (ie. "domain.com"). You must in this case purchase an SSL certificate and install it in your own server by following the instructions for the provider. Once the certificate is installed, you must redirect your naked domain to your www-domain.

That is the easy part and can be done with a snippet such this (if you're using Nginx):

server {
listen 443;
server_name domain.com;
if ($host = domain.com) {
rewrite ^(.*) https://www.domain.com:443$request_uri? permanent;
}

Or you can alternative:

server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;

return 301 https://www.example.com$request_uri;
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com;
return 301 https://www.example.com$request_uri;
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.example.com;

====>>> Your site configuration goes here <<======
}

Overwhelmed? No worries, we understand your pain. Forget about all that process and try NakedSSL: it's free for one domain.

NakedSSL: One domain, free forever:

Start with our free single-domain plan and upgrade only if necessary: NakedSSL offers 3 different plans for all your needs.
Need even more domains? Just contact us.