301 redirect and new domain

I have recently moved my blog from domain1.com to blog.domain2.com. (notice, it’s a separate domain, plus to a subdomain). For some of my users the redirect works but for some it doesn’t and they get a ‘[browsername] cannot establish a secure connection to the server’.

I am self-hosting Ghost in AWS and I have done the following steps:

  1. add a new DNS entry for the domain2 domain pointing to the AWS IP where the blog is now hosted (domain provider)
  2. Reconfigure the blog for ‘blog.domain2.com’ (opening blog.domain2.com works) (at AWS)
  3. edit the old nginx config files to do 301 redirect, like so (at AWS):
    (both for SSL and non-SSL)

server {
listen 80;
listen [::]:80;

server_name domain1.com;

location / {
    return 301 https://blog.domain2.com$request_uri;
}
location ~ /.well-known {
    # Allow SSL certifcate renewal
    allow all;
}

}

  1. edit the DNS for the old domain to do a 301 redirect (at domain provider) for both http:// and https:// to point to https://blog.domain2.com

Why would the redirect work for some but not for other people?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.