Attach to Process

CustomDomain

I purchased a new domain, nowlisteningto.com for my Now Listening to... music blog. Prior to buying the new domain name, I didn't realize how big of a pain it was going to be to set up redirection. Turns out, you can't setup a 301 redirect using just DNS records. It has to be done on a web server level, or via your domain registrar. My issue is that I can't use my domain registrar for redirects, because I use Netlify to manage the DNS records for my domains. And from what I can see, Netlify doesn't have a menu option for redirecting from one domain to another.

So, I ended up doing a redirect via HTML and JavaScript, by hosting a static site on Netlify. This static site's purpose is to simply redirect from nowlisteningto.dinobansigan.com to nowlisteningto.com. It is not ideal, but this will do for now until I figure out a better solution. Thanks to this answer on StackOverflow for the idea.

Tags: #CustomDomain #DomainRedirect #HTML #JavaScript

Discuss... or leave a comment below.

Update 12/27/2018: The ping command is also available on a MacOS terminal.

I finally have my own custom domain and this site is now on dinobansigan.com as opposed to dinobansigan.github.io. I initially had trouble getting the site up and running on my custom domain. I learned that you need to add A records to make a custom domain work with Github pages. So I did that but I still couldn't get to the site.

Did a search on bing (yes I use Bing) and the top troubleshooting tip was to verify which IP address my site was resolving to. To do that, I would have to run the Dig command on my domain name. The Dig command is a Linux command and I'm on a Windows PC so that won't work. Turns out you can use the good old Ping command to do the same thing. So I fired up the command prompt and typed “ping mydomainname.com”. I was then able to see what IP address my site was resolving to.

Note: It took awhile for my site to work with my custom domain even after I correctly setup the A records. I was starting to think I did it incorrectly. So just wait 10-20 minutes and try again.

#CustomDomain

Discuss... or leave a comment below.