#WCLVPA @salcode

How to Avoid Mucking Up Your DNS

Sal Ferrarello / @salcode

"Hey Sal, is something going on with the website..."

IP Address

Every server on the Internet can be identified by an IP address

example 181.224.144.57

Nameservers

Provide information (including IP addresses) based on domain names.

"A Record"

Associates an IP address with a domain name

salcode.com. 181.224.144.57
localhost.salcode.com. 127.0.0.1
ironco.de. 50.63.202.31

Read from Nameservers with dig


dig salcode.com

;; ANSWER SECTION:
salcode.com.	3599	IN	A	181.224.144.57

(or online version)

Used Wrong IP Address

Never type an IP address, always copy-and-paste

TTL
(Time To Live)

How many seconds to cache the IP address lookup

Failed to Reduce TTL

With a TTL of 604800, go live was "delayed"

"CNAME Record"

Associates a domain name with another domain name

github.salcode.com. salcode.github.io.
www.salcode.com. salcode.com.

Special Characters

@

@ Root domain - matches the bare domain

*

* Wildcard - matches any undefined sub-domain

$ dig A ironco.de

;; ANSWER SECTION:
ironco.de.   3413  IN  A  50.63.202.31
				
$ dig CNAME github.ironco.de

;; ANSWER SECTION:
github.ironco.de. 3202 IN
    CNAME salcode.github.io.
				
$ dig www.ironco.de
;; ANSWER SECTION:
www.ironco.de.  3600 IN CNAME ironco.de.
ironco.de.      3600 IN A     50.63.202.31
				

Trailing Period

Indicates a Fully Qualified Domain Name (FQDN) as opposed to relative.

www relative
www.salcode.com. FQDN
www.salcode.com relative

Omitted Trailing Period

ASPMX.L.GOOGLE.COM

I pointed our email to
ASPMX.L.GOOGLE.COM.SALCODE.COM

Include a Trailing Period

(at least try)

Which Nameserver


dig NS salcode.com

;; ANSWER SECTION:
salcode.com.	ns-1596.awsdns-07.co.uk.
salcode.com.	ns-343.awsdns-42.com.
salcode.com.	ns-872.awsdns-45.net.
salcode.com.	ns-1476.awsdns-56.org.

Updated the Wrong Nameserver

Why haven't these DNS changes come through?

Whisper Down the Alley

Query a Nameserver Directly


dig salcode.com @ns-872.awsdns-45.net

Examples of DNS Records

Other Record Types

MX Records

MX Records.

TXT Records

TXT Records.

Review

  • IP Address - phone number
  • A Record - phone listing (name to number)
  • CNAME Record - name change listing
  • TTL - how long a DNS value is cached
  • dig is amazing (online version)
  • I've made lots of mistakes

Iron Code Studio

Sal Ferrarello

salcode.com/love-dns

@salcode

Image Credits

  • https://pixabay.com/en/phone-ancient-old-ring-handset-14131/
  • https://commons.wikimedia.org/wiki/File:MichYellowBooks.JPG
  • https://pixabay.com/en/magnifying-glass-bible-bibliology-162886/
  • https://pixabay.com/en/books-library-education-literature-768426/
  • https://commons.wikimedia.org/wiki/File:Red_Screen_-_Windows.png
  • https://pixabay.com/en/hours-time-clock-analog-watch-343191/
  • http://disney-destiny.wikia.com/wiki/Eeyore