engineering icon indicating copy to clipboard operation
engineering copied to clipboard

baseurl and 301s

Open silasbw opened this issue 6 years ago • 2 comments

We'd like to be able to set baseurl so that we can host the blog using shared hostnames (e.g., godaddy.com).

As part of setting baseurl, we also need to add 301 logic for existing post URLs (so that those links don't break).

silasbw avatar Jul 08 '19 16:07 silasbw

You will want to update the _config.yml file and:

  1. Add a baseurl: '/your/path/here' definition.
  2. Enable the Jekyll Redirect From plugin and add your 301 redirects to all post and page front matter.

Should you decide to use a shared apex domain (godaddy.com) that is already hosting content, as opposed to using a dedicated subdomain (e.g., engineering.godaddy.com), you may need to make further decisions regarding whether to keep using our GitHub Pages deployment vs self-hosting Jekyll. I believe that, to use a subdirectory on the existing page, you will need to setup a reverse proxy from the subdomain to the GitHub Pages content.

chrisvogt avatar Jul 08 '19 17:07 chrisvogt

Solved! By the way, that jekyll plugin can only redirect within the site. Since we needed to redirect to a whole other domain, I set up the redirect copy of the blog with meta refresh url redirections

kyle-maxwell avatar Jul 12 '19 00:07 kyle-maxwell