https-redirect-javascript-with-meta-fallback

Redirect HTTPS domains to HTTP or HTTPS domains using Github Pages

View the Project on GitHub adrw/https-redirect-javascript-with-meta-fallback

HTTPS Redirect with Javascript and Meta Fallback

Redirecting HTTPS links is not possible with DNS 301 URL redirect records.

For example, using DNS alone https://domain1.com/xyz.html can not be redirected to https://domain2.com/xyz.html.

Instead, the HTTPS for domain1.com must terminate at a server before the client can be redirected to domain2.com.

Thus this repo:

Styled HTTPS Redirect for andrewparadi.com

Guide

  1. Hit the Use Template button to create a new repo using this repo as template
  2. Move files from src/ into the top level directory
  3. Copy 404.html to index.html
  4. grep throughout 404.html for andrewparadi.com (old site) and andrew.fm (new site) to replace with your redirect source and target values
  5. Update CNAME file with your source website that you want to redirect from
  6. Go to repo settings
  7. Turn on Github Pages from master branch
  8. Update DNS settings for source domain to point at this repo. Check Github docs for more complex configuration.
     A       @       185.199.108.153
     A       @       185.199.109.153
     A       @       185.199.110.153
     A       @       185.199.111.153
     CNAME   www     adrw.github.io.   
    

Resources