Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 3

HTTPS issues in tandem with www subdomain

Solved! Go to Solution.

My app on gh-pages works very nicely, except that https://www.mltp.ly leads to "Connection isn't private" warning page. Following are relevant info:

 

  • Custom domain in use is: mltp.ly
  • "Enforce HTTPS" is enabled via repo settings.
  • Relevant DNS records:
    • mltp.ly   A   185.199.108.153
    • www.mltp.ly    CNAME  mltp.ly
  • This is a pure frontend site that leverages React.js (not sure if relevant).

 

Here's how different URLs behave:

 

So that last case is the problematic one. Any clues why is shows a warning instead of redirecting to the apex domain right away?

 

Thanks for your help, and apologies if I missed relevant documentation.

 

 

2 Replies
Solution
Pilot Lvl 1
Message 2 of 3

Re: HTTPS issues in tandem with www subdomain

Hi,

Although I do not know the reason that this happens, I have experienced it myself, and through research. I have found a fix to it.

I’m not sure what domain registrar you bought your domain from, but it doesn’t really matter. I got mine from Google Domains. I found a really good site, called Cloudflare(cloudflare.com). It is even better than Google’s name servers. I suggest you use their service, as they provide really fast stuff for free and they can fix the issue.

Basically, I changed my Google domain name severs(DNS) from Google’s to Cloudflare’s, so I could control my domain from Cloudflare now. In Cloudflare, there is a section called “Page Rules,” where you can make rules such as redirects. From there, I made a page rule that said that any address with *www.yourdomain.com/* will be redirected to https://yourdomain.com/$2 . * is a wildcard character, so anything before www will be redirected to https://yourdomain.com/$2 . The $2 means anything after the / will replace $2. I have attached a picture with my example as well for you to use.0B2529F8-3D5E-4E94-B810-0B102E612045.png

 

F7C57A80-E90F-4613-A547-914C4DD69E17.png

 

Sorry for the long explanation, I’m bad at explain things.

Copilot Lvl 3
Message 3 of 3

Re: HTTPS issues in tandem with www subdomain

That's a great idea! Thank you very much. I'm attempting to move NS to Cloudflare now. WIll update this thread asap.