A step by step guide to buying an ENS domain on mainnet

Step 1: Checking Name Availability

Make sure your Metamask is pointing to the mainnet. Head over to the official ENS domain name manager, and search the domain you want. If your name is unavailable you will be able to try to solicit the domain (offer the owner funds for the name). Otherwise, it should look like this.

An available searched name

Step 2: Buying the Domain

Choose how long you want to rent the name for. The way the new permanent registrar is set up means it is much cheaper to buy a domain than before.

Once you have chosen a rental period click “Request To Register”. The first transaction is to connect to the ENS dApp and request the name for registration. It should not be an expensive transaction. The cute green loading bar represents the waiting period, which is probably checking that the name is not registered on an older registrar.

The waiting period is now over, and you can continue with the registration.

Clicking “Register” will trigger another transaction. This transaction will be paying the rental fee you chose earlier. If your transaction fails, increase your gas.

A successfully purchased domain

Note: Names registered or transferred to the new permanent registrar and NFTs. This means to transfer the domain you transfer the NFT. This also means you can check you have your name by checking your wallet for NFTs.

Step 3: Setting up your domain

On the same page that you were just on, click “Manage Name”.

The name manager interface

The first thing we are going to do is set the resolver address. Click the “Set” button in line with the blank resolver address.

Setting the resolver address

Learn how to manage your name

We want to click “Use Public Resolver”. This can be changed later if you want to make a custom resolver. This should trigger a transaction. Don’t worry if your resolver address is different from the one below.

Now we are going to add a record. When you click the “+” you should see the screenshot below. In the drop-down select “address”, then copy paste the address you want your domain to resolve to (the address you want your domain to “equal”). Then hit “Save”. This should trigger a transaction.

Adding an address as a record.

Once your transaction has successfully mined it should ask you to set your reverse record. The address you entered in the previous step should be greyed out with your domain name under it. This is setting the address your domain name reverse resolves to. Once you are pretty sure this is the address you want your name to resolve to click “Save”. This should also trigger a transaction.

Setting the address your ENS domain name will resolve to

Your ENS domain is all set up!

You should get a little confirmation when the transaction has successfully mined.

Step 4: Subdomains

Switch to the subdomain tab (at the top, across from your domain name).

The subdomain tab

Go ahead and “Add Subdomain”. The label you enter for your subdomain does not need to be followed by your domain name.

Don’t: add your domain after the subdomain

Do: just write down the subdomain

Hit save. This will trigger a transaction. When your transaction mines, the subdomain should appear below the “Add Subdomain” button. Click on your new subdomain.

Manager page for your subdomain

We need to set the resolver, again using the public resolver (it’s the same process). Once your resolver is set we are going to add a record, again this is exactly the same process as when you did it for your domain.

“+” add record > choose “address” in the drop-down > paste the address you want this subdomain to resolve to > “Save”, approve the transaction. Then you should get the message below:

Message drop down

The message dropped down

Click “Save”, approve the transaction and then you are done!

Implementing ENS in a dApp

Want to know how to implement ENS in a dApp? Check out this repo I made, showing the basics for ENS implementation, creating subdomains and the how-to javaScript goodness.

Endnote: If you want to get updates on what the next tool I’m covering is, or if you just want to connect, hmu on twitter, or follow me here on Medium.

read original article here