www vs non-www and http vs https for SEO

April 2016

When learning about SEO, you have probably read that you should only use www or non-www and only http or https. This begs the question: What does "only" even mean? Does it mean in all your blogs and PR events you must link consistently to https://www.example.com or is a forward from http://example.com to https://www.example.com good enough? My research for this suggests that a forward is enough and you do not need to worry, as long as you register all the versions of your site in the Google Search Console.

Nowadays if you have a somewhat potent webapp, you probably need users to login and therefore you need SSL (https). Whether you use www or non-www doesn't matter as long as you are consistent. Quora.com redirects to www and stackoverflow redirects to non-www, so you have examples of two sites that are good at SEO with different settings.

Now lets say we want to setup our www https page. What we can't do is a 301 permanent redirect on the registrar, since they can't redirect https non-www. So we will have to write the redirects on our own servers. So in the end we will have:

A record: @ pointing to <my_IP>
CNAME alias: www pointing to @

while the redirects non-www to www and http to https happen on the server. Here is an example for how to redirect from http to https using nginx.

Dear Devs: You can help Ukraine🇺🇦. I opted for (a) this message and (b) a geo targeted message to Russians coming to this page. If you have a blog, you could do something similar, or you can link to a donations page. If you don't have one, you could think about launching a page with uncensored news and spread it on Russian forums or even Google Review. Or hack some russian servers. Get creative. #StandWithUkraine 🇺🇦
Dear russians🇷🇺. I am a peace loving person from Switzerland🇨🇭. It is without a doubt in my mind, that your president, Vladimir Putin, has started a war that causes death and suffering for Ukrainians🇺🇦 and Russians🇷🇺. Your media is full of lies. Lies about the casualties, about the intentions, about the "Nazi Regime" in Ukraine. Please help to mobilize your people against your leader. I know it's dangerous for you, but it must be done!