Do I Have Correct DNS Records to Do Permanent Redirect?

I have implemented SSL on my Nginx website (say it's example.com) and everything seems to be working correctly. However, I want to ensure that the following redirects always happen:

* http://example.com -> https://www.example.com

<url url="http://www.example.com">http://www.example.com</url> -> <url url="https://www.example.com">https://www.example.com</url>

<url url="https://example.com">https://example.com</url> -> <url url="https://www.example.com">https://www.example.com</url></list> 

Some articles I've read say that I need to have the following DNS A records:

@     <my server="" ip="">www</my> 

What I see in my Linode DNS Manager is this:

Hostname        IP Address
                <my server="" ip="">mail            <my server="" ip="">www</my></my> 

Is that first record where the Hostname field is blank the "@" record? Do I need any additional DNS records to implement the redirection I want?

By the way, I realize I will still need to reconfigure Nginx. I just want to ensure that I have things correct from a DNS perspective.

Thanks.

2 Replies

@rlfprog:

I have implemented SSL on my Nginx website (say it's example.com) and everything seems to be working correctly. However, I want to ensure that the following redirects always happen:

* http://example.com -> https://www.example.com

<url url="http://www.example.com">http://www.example.com</url> -> <url url="https://www.example.com">https://www.example.com</url>

<url url="https://example.com">https://example.com</url> -> <url url="https://www.example.com">https://www.example.com</url></list> 

Some articles I've read say that I need to have the following DNS A records:

@     <my server="" ip="">www</my> 

What I see in my Linode DNS Manager is this:

Hostname        IP Address
                <my server="" ip="">mail            <my server="" ip="">www</my></my> 

Is that first record where the Hostname field is blank the "@" record? Do I need any additional DNS records to implement the redirection I want?

Thanks.

Those records look fine (@ and blank are equivalent hostnames) however A records won't direct https traffic to http – that's something your web server needs to take care of. If it's already re-directing properly, then you should be good to go with those A records.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct