<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rithvik Vibhu</title>
    <description>The latest articles on DEV Community by Rithvik Vibhu (@rithvikvibhu).</description>
    <link>https://dev.to/rithvikvibhu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F107815%2F4474e1ce-3689-4647-84b0-7ee9ccc0e925.png</url>
      <title>DEV Community: Rithvik Vibhu</title>
      <link>https://dev.to/rithvikvibhu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rithvikvibhu"/>
    <language>en</language>
    <item>
      <title>Setting up a Handshake TLD with a hosted DNS service</title>
      <dc:creator>Rithvik Vibhu</dc:creator>
      <pubDate>Thu, 19 Nov 2020 08:16:40 +0000</pubDate>
      <link>https://dev.to/rithvikvibhu/setting-up-a-handshake-tld-with-a-hosted-dns-service-2g6c</link>
      <guid>https://dev.to/rithvikvibhu/setting-up-a-handshake-tld-with-a-hosted-dns-service-2g6c</guid>
      <description>&lt;h1&gt;
  
  
  What is Handshake?
&lt;/h1&gt;

&lt;p&gt;Handshake is a decentralized naming protocol for allocating ownership rights to Top Level Domains (TLD), such as a &lt;code&gt;.com&lt;/code&gt; or a &lt;code&gt;.org&lt;/code&gt;.&lt;br&gt;
&lt;a href="https://www.namebase.io/blog/tutorial-1-what-is-handshake-and-hns/" rel="noopener noreferrer"&gt;More info.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically, it lets everyone own and control Top Level Domains (like &lt;code&gt;.nb&lt;/code&gt;, &lt;code&gt;.yup&lt;/code&gt;, etc.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Get a name.
&lt;/h2&gt;

&lt;p&gt;If you don't have one yet, check out &lt;a href="https://namebase.io" rel="noopener noreferrer"&gt;Namebase&lt;/a&gt; (it's a platform to buy/sell hns coins and bid/sell/manage handshake names).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now if you bought or manage the name on Namebase, you're already set! It's easy to set DNS records, point to web hosts, or anywhere else.&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Using a different DNS host
&lt;/h1&gt;

&lt;p&gt;So you've got a new handshake name and want to start using it as soon as possible. Instead of the easy way (sticking with Namebase), if you want a challenge, this post is for you!&lt;/p&gt;

&lt;p&gt;There are a lot of different DNS / nameserver hosts out there, like Cloudflare and ClouDNS. But most of them require a traditional domain with an ICANN TLD. These domains need to resolvable by them to work.&lt;/p&gt;

&lt;p&gt;Fortunately, some don't have this restriction. Amazon's Route53 and NS1 work fine with handshake names.&lt;/p&gt;

&lt;p&gt;There are basically 2 parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a zone with any DNS hosting service.&lt;/li&gt;
&lt;li&gt;Update the DNS records on the blockchain to point to the said service.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  I. Create a zone
&lt;/h3&gt;

&lt;p&gt;I'm gonna go with Route53, but any of the supported services will do; the process is similar.&lt;/p&gt;

&lt;p&gt;Btw, Route53 costs $0.50 per hosted zone / month + $0.40 per million queries. It's not free, but still pretty cheap.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Sign up for AWS and go to &lt;a href="https://console.aws.amazon.com/route53/v2/home" rel="noopener noreferrer"&gt;Route53&lt;/a&gt; in the console.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3bny8h7oij1vfedu7yjq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3bny8h7oij1vfedu7yjq.png" alt="AWS Route53 Dashboard"&gt;&lt;/a&gt;&lt;br&gt;
Click on Create a Hosted Zone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fill in the handshake name and leave the type as &lt;strong&gt;Public&lt;/strong&gt;. We want it to be reachable from anywhere.&lt;br&gt;
For now, I'm gonna go with &lt;code&gt;http://awstest.giftsld/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F513s70l1ylgjpi8avn5o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F513s70l1ylgjpi8avn5o.png" alt="Hosted zone"&gt;&lt;/a&gt;&lt;br&gt;
Note down the 4 NS records (&lt;code&gt;ns-*.awsdns-*.*&lt;/code&gt;). We'll use this to update the DNS on the blockchain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add any DNS records pointing to your webserver or static hosting site has given you. It's typically an &lt;code&gt;A&lt;/code&gt; record with an IP address or a &lt;code&gt;CNAME&lt;/code&gt; with a domain.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For example, Vercel gives an &lt;code&gt;A&lt;/code&gt; record in Settings -&amp;gt; Domain:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3g6f0tkga5gl0vfprn47.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3g6f0tkga5gl0vfprn47.png" alt="Vercel domain settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  II. Update the handshake name DNS
&lt;/h3&gt;

&lt;p&gt;Now that Route53 will respond properly, we need to point the handshake name to use it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open wherever you manage the name. Can be a wallet (like Bob Wallet) or on Namebase itself (we're only using Namebase to update the record, not its DNS hosting service).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get the IP addresses of the 4 nameservers we noted down earlier. The dig program makes this easy: &lt;code&gt;dig +short ns-507.awsdns-63.com&lt;/code&gt;. 4 domains will give 4 IP addresses.&lt;br&gt;
We have to do this because only IP addresses can be added for subdomain &lt;code&gt;NS&lt;/code&gt; records.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fndytrktymk8omxi534ke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fndytrktymk8omxi534ke.png" alt="Namebase blockchain DNS"&gt;&lt;/a&gt;&lt;br&gt;
Create 4 NS records with the Name as the subdomain and the value as the IP addresses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Save it!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And now we wait.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FPBSA32O.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FPBSA32O.jpg" alt="And now we wait."&gt;&lt;/a&gt;&lt;br&gt;
Because of the way the blockchain works and multiple levels of caching, the changes on the network will only reflect in ~6 hours.&lt;/p&gt;

&lt;p&gt;If your computer is set to resolve handshake names, try visiting them with &lt;code&gt;http://&amp;lt;name&amp;gt;&lt;/code&gt;. If not, there's always &lt;a href="https://hns.to" rel="noopener noreferrer"&gt;https://hns.to&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Hope this helps anyone new to Handshake. If you have any tips or suggestions, please leave them down in the comments.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>handshake</category>
      <category>dns</category>
    </item>
  </channel>
</rss>
