GitHub Pages https/www Redirect

后端 未结 2 1523
名媛妹妹
名媛妹妹 2020-12-24 06:45

How can I get https://www.test.com to redirect to https://test.com when using GitHub pages to host a static website?

I recently enabled TLS (provided by GitHub/Lets

相关标签:
2条回答
  • 2020-12-24 07:04

    What worked for me:

    • Change your custom domain to be prefixed with www., like this:

    • Save the settings and wait until www.example.com resolves and works.

    • Remove the www. prefix and save again.

    • Wait for browser and DNS caches to invalidate.

    • All combinations should lead to https://example.com/ and no SSL error should appear.

    0 讨论(0)
  • 2020-12-24 07:14

    The simplest way would be to add a CNAME record from www.test.com to test.com. This will definitely work, I've done it a million times for my clients while I worked at a certain domain provider. I'm not sure why they didn't suggest that. Ports do not matter here as it is a domain redirect.

    0 讨论(0)
提交回复
热议问题