Skip to content

Instantly share code, notes, and snippets.

@tylergaw
Last active December 18, 2019 03:29
Show Gist options
  • Save tylergaw/e6a9c488e3d1f5219e785a70432b378e to your computer and use it in GitHub Desktop.
Save tylergaw/e6a9c488e3d1f5219e785a70432b378e to your computer and use it in GitHub Desktop.

Migrating tylergaw.com to Netlify

1. Deploy repo via Netlify dashboard

2. Set up with a spare domain to test redirects and subdomains before switching the primary domain

  • Create namecheap alias record
  • Wait
  • Be unsure if I set up the DNS correctly
  • Wait longer
  • I guess it works now?
  • Create a CNAME record for www to lucid-swartz-72ad0e.netlify.com. to redirect www to bare domain
  • SSL takes some time. Wait more

3. Subdomains for previous versions

v1.tylergaw.com, v2.tylergaw.com, et. al

  • Asked about doing tag deploys https://twitter.com/tylergaw/status/1205973982568161282 Seems like it's not a thing yet
  • ^ took a different direction instead of writing manual deploy code
  • Create a new Netlify site for each subdomain. Since they are all from the same repo, I just download the zip file from the git tag
  • Create cname for each subdomain that points to the site's url
  • v3 uses ssi. Was using nginx ssi, and years before that apache ssi. Netlify doesn't have support for that, so had to update the site code
  • It's cool that they automatically handle /good-path when the file is good-path.html. I didn't have to add redirects
  • Couldn't figure out how to make configuration netlify.toml work with drag and drop deploy. Needed to build those sites locally and deploy the build directory; v4 and v5
  • Learned about and set up redirects for lab projects
  • Used snippet injection to add base for certain projects in lab
  • Added config to allow cors requests of font file from stackoverflow
  • Audio API cross origin issue stackoverflow "MediaElementAudioSource outputs zeroes due to CORS access restrictions"
  • Remove all Google Analytics

4. Transfer dns

Change DNS to namecheap basic dns instead of using custom slicehost dns. Wait longer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment