{"id":5307,"date":"2018-07-24T21:45:16","date_gmt":"2018-07-24T21:45:16","guid":{"rendered":"https:\/\/really.zonky.org\/?p=5307"},"modified":"2018-07-24T21:45:16","modified_gmt":"2018-07-24T21:45:16","slug":"dns-naming","status":"publish","type":"post","link":"https:\/\/really.zonky.org\/?p=5307","title":{"rendered":"DNS Naming"},"content":{"rendered":"<p>As someone who has spent far too much time dealing with the Domain Name System, I get kind of miffed when people insist on creating names that conflict with the DNS ordering. You see the DNS naming works from right-to-left (the wrong way around if you&#8217;re reading this in English).<\/p>\n<p>Take the name for this site &#8211;\u00a0<em>really.zonky.org<\/em> &#8211; which is admittedly a rather quirky name. The most significant part of the name is at the right (<em>org<\/em> &#8211; and yes I&#8217;m ignoring the <em>really<\/em> significant and invisible &#8220;dot&#8221;). The next most significant part (<i>zonky<\/i>) specifies what organisation has registered the site (me), and the least significant part (<em>really<\/em>) points to one service at that organisation.<\/p>\n<p>So when people ask for names that break that ordering it is ever so slightly irritating &#8211; for example if you have a service called\u00a0<em>mail.zonky.org<\/em> and wanted a test service you might request\u00a0<em>mail-test.zonky.org<\/em> which breaks the ordering of things. As an alternative,\u00a0<em>test.mail.zonky.org<\/em> doesn&#8217;t break the naming, looks a bit nicer, and ultimately more reasonably flexible.<\/p>\n<p>Let us look at a slightly more complex example; let&#8217;s assume that we have a domain called\u00a0<em>db.zonky.org<\/em> and want to register a service name for each database. We\u00a0<em>could<\/em> register names such as\u00a0<em>db-addresses.zonky.org<\/em>, and\u00a0<em>db-orders.zonky.org<\/em>, or we could register them instead as\u00a0<em>addresses.db.zonky.org<\/em> and\u00a0<em>orders.db.zonky.org<\/em>. In the later case, I can very quickly write a firewall rule that allows access to\u00a0<em>*.db.zonky.org<\/em> (whereas\u00a0<em>db-*.zonky.org<\/em> would not work).<\/p>\n<p>Ultimately suggest names in DNS naming order unless you can justify why it is not suitable.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4306\" src=\"https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/damascus-dns.jpeg?resize=695%2C463&#038;ssl=1\" alt=\"\" width=\"695\" height=\"463\" srcset=\"https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/damascus-dns.jpeg?w=792&amp;ssl=1 792w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/damascus-dns.jpeg?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/damascus-dns.jpeg?resize=768%2C512&amp;ssl=1 768w\" sizes=\"auto, (max-width: 695px) 100vw, 695px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As someone who has spent far too much time dealing with the Domain Name System, I get kind of miffed when people insist on creating names that conflict with the DNS ordering. You see the DNS naming works from right-to-left (the wrong way around if you&#8217;re reading this in English). Take the name for this <a href='https:\/\/really.zonky.org\/?p=5307' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_share_on_mastodon":"0"},"categories":[4],"tags":[748,921,1766],"class_list":["post-5307","post","type-post","status-publish","format-standard","hentry","category-it","tag-dns","tag-internet","tag-naming","category-4-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1f2KI-1nB","_links":{"self":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/5307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5307"}],"version-history":[{"count":3,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/5307\/revisions"}],"predecessor-version":[{"id":5310,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/5307\/revisions\/5310"}],"wp:attachment":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}