Monday, 2 May 2016

Learning CNAMEs, A Records and DNS Management

Most people's idea of a relaxing night is likely to be a movie, reading a book or maybe playing a game.  Mine isn't exactly that different and often involves tinkering and improving things.  Sometimes it's this blog, where I attempt to make it look better, read better or just generally be better.  99% of the time it fails completely and I go back to the drawing board.

As part of my recent inspiration, an idea came to me, and part of that was to take literal ownership of my blog.  Well, the name anyway.  Ah, so easy it will be, I naively thought.  Domain name purchasing service + monies = win.  Not quite.  For a total layperson, it turns out the domain name purchasing gives you exactly that: a name.  Not to worry! Google tells me.  You can link your name to your normal blog management and all will be well with the world.  Your new name will take everyone to your blog and your old name will still take everyone to your blog.  Awesome, I thought.

But wait.  There's the small matter of proving to Google that you own the domain name, of course.  Luckily, Google gives you step by step instructions of how to do this.  Easy, right?  Kind of.  And that's how I ended up turning my relaxing tinkering into a whole night of learning DNS management.

It's never a good sign when the first step on a journey makes you realise that you have no idea what it even is.  As I pondered Google's instructions I realised I'd been hearing about "DNS" for years, but somehow had not managed to ever find out what it actually is.  It stands for Domain Name System.  Ah ok, that's a bit better.  I'm managing my domain name.  Good start for getting my newly purchased domain name to work.

But wait. Now, you need to consider CNAMEs and A Records too.  Wait... I thought I was learning DNS management.  Oh.  They're part of DNS management.  Ok...  If I was a drinker, it would have probably been here I would have reached for the wine.  Instead I have orange and peach flavoured water which will have to do.

First up, the CNAME.  Naturally I had no idea what this was either.  In English it's an alias.  In this instance it's using my new domain name as an alias for the place where this blog actually sits on Google's servers.  Turns out, once you've done a bit of copying and pasting to point your domain name at the little bit of Google your account has given you, you're pretty much there.

But wait.  There's also A Records.  Wat?  Turns out an A Record isn't far from a CNAME and it makes sure that if someone uses a logical version of your domain name, for example not typing in the "www" at the beginning, that person still gets pointed to your bit of the internet.  It seems, you can do that by copying and pasting too.  Good good.

Last step, link old name to all the work I've just done and press save.  Tah Dah!  WEBSITE LIVES.

Only it did not. Upon visiting my lovely piece of the internet, I was greeted with the joyous message that my newly created settings were wrong.  And this is of course the trouble with following step by step instructions that involve copying and pasting; you don't actually ever understand what you're copying and pasting in and the effect it has.

One and a half episodes of season 2 of True Detective later and I think I've got it cracked.  I've also got a bit of a headache and it's after 2:30am on a Sunday.  Well, Monday actually.  Good job it's a Bank Holiday or I would need a coffee drip for the entire day.

I'm not 100% sure I've truly learnt anything and I'm a little paranoid that the error message is going to show up again.  But so far things seem to be working, so I think I'll wing it for a while.  So here we are My very own piece of the internet.  Hopefully, it should be exactly the same as it was before, but to me I feel a real change.

No comments:

Post a Comment