DEV Community

Discussion on: DNS Record Crash Course for Web Developers

Collapse
 
caruso profile image
Giuseppe Caruso

Chris, awesome post, straight to the point. πŸ™ŒπŸΌ

Can I suggest an edit?
It would be great, by using different colors, or just pointing it out, what is shown in your browser, and what is served.

E.G if I use a CNAME (does C stand for Canonical? πŸ€”) redirecting www.example.com to example.com, you can make it clearer with colors that the host www typed into the address bar will be shown in place of the domain without it, which, in turn, will show the actual content on the server.

TYPE            HOST    URL (in browser)         DOMAIN (served)
======================================================================
A Record        @       example.com        ->    104.198.14.52
----------------------------------------------------------------------
CNAME Record    www     www.example.com    ->    example.com
----------------------------------------------------------------------
CNAME Record    blog    blog.example.com   ->    example.herokudns.com
======================================================================
Enter fullscreen mode Exit fullscreen mode

That way, it's easier to understand that:

URL IN BROWSER                                ACTUAL CONTENT SERVED
======================================================================
www.example.com    ->    example.com    ->    104.198.14.52
======================================================================
Enter fullscreen mode Exit fullscreen mode

And, again, thanks for the super useful wrap-up!

Collapse
 
chrisachard profile image
Chris Achard

This is a great way to visualize/explain it. Thanks!