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.
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.
Clicking “Register” will trigger another transaction. This transaction will be paying the rental fee you chose earlier. If your transaction fails, increase your gas.
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 first thing we are going to do is set the resolver address. Click the “Set” button in line with the blank resolver address.
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.
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.
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).
Go ahead and “Add Subdomain”. The label you enter for your subdomain does not need to be followed by your domain name.
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.
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:
Click “Save”, approve the transaction and then you are done!
Implementing ENS in a dApp