FAQs

How do I redirect my naked domain (with SSL) on Heroku?

Do you have problems redirecting your naked domain with Heroku? Don't worry, we are here to help with a simple how-to that will guide you through all steps necessary to redirect your naked domain. Let's get started:

Step 01: Check if your www domain is pointing to Heroku

CNAME records for naked domain redirection

First things first: you need to make sure that your www domain is pointing to Heroku and set up correctly. Go to your Domain provider and check that there is a CNAME Record for your www domain. Is it already pointing to Heroku? Great, then it is time to move on to step 02. If it is not set to redirect to Heroku yet, you want to add that now. Go to your application page in Heroku and copy the details for the CNAME record. Paste it into the CNAME Field in your domain providers interface and voilà, you are ready to move on to step 02.

Step 02: Redirect your naked domain

Please note: The following process is pretty time consuming. Therefore we built NakedSSL to solve naked domain redirections hassle-free and without all the frustrations. Check now if we can redirect your naked domain for you or scroll down to get to the DIY how-to guide.

Test now if we can redirect your domain ✌️

Hey, at least we didn't waste your time creating an account. If you made a mistake in your URL, just run the checker again. And if you don't even have a SSL certificate installed, these guides get you started:

You can create an account and get your URL redirected safely with SSL in no time.

http://

If you don't have a certificate for domain.com redirecting from https://domain.com to https://www.domain.com will not work, because before the browser gets the redirect it has to successfully establish the SSL connection (https is http inside SSL) and this fails because the certificate does not match. First of all, you need to have a valid SSL certificate for both your www and naked domains. After getting the certificate, you need to install the certificate on your server, which is a little tricky, but here are a few ways to set it up:

You could use an if condition in your Nginx configuration, e. g. like this:

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

Or you could use the following configuration to create a 301 redirect for your naked domain:

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 <<======
}

If that process seems a little complicated, don't worry — we got you covered. NakedSSL is easy, simple, and convenient and will guide you through an easy process of redirect your naked domain.

NakedSSL: One domain, free forever:

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

High-volume plans

Our high volume plans include API Access and are especially designed for those that need bigger capacity at an affordable price. Need even more domain redirections? Just contact us to explore our enterprise plans.