How to resolve my ens domain name to my server ip address?

I want to use the domain name of ens to build a website of my own, but I don’t see the place to enter ip in the management center.

It cannot resolve directly to an IP address, but you can still make that work. You can create a little dummy HTML page with a redirect meta tag or script like window.location.replace(...), put it up on IPFS, then link your IPFS hash on your ENS content record. Then browsers that support ENS+IPFS like Brave/Opera will load your IPFS website and immediately redirect to anywhere you want!

1 Like

Your answer is too esoteric, I don’t quite understand it, should I study blockchain related technologies in depth to understand your answer.

It can resolve directly to an IP or IPFS hash without a header or window redirect :innocent::innocent: Give me some time to dig it. Not straightforward, uses IPLD.

For example, create an HTML file like this:

<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Location" content="https://yourlocationhere" />
		<meta http-equiv="refresh" content="0; URL=https://yourlocationhere" />
	</head>
	<body/>
</html>

Then upload it to IPFS. Pinata has a free tier you can use: https://www.pinata.cloud/

Once it’s uploaded to IPFS you should have a Content ID like

QmaZCJGQQd1CwUS7Xu5qf9v17vpb1JmcRrMBhGDF4i4Ujw

Or

bafybeifvqlxduvcdaaw6dmcertu76eh4mvg4ehpugrsr4ch46rpyw2u75y

Then in the ENS manager app, set your content record to the IPFS URL, like:

ipfs://QmaZCJGQQd1CwUS7Xu5qf9v17vpb1JmcRrMBhGDF4i4Ujw

Or

ipfs://bafybeifvqlxduvcdaaw6dmcertu76eh4mvg4ehpugrsr4ch46rpyw2u75y

Now when someone visits your .eth name in a browser, they’ll be redirected to whatever URL you put in that HTML file.

1 Like

They’re assuming that you understand markup language and can set a tag to redirect your request to a IPFS+ENS ready browser that will parse (html code) on the client side (within the browser) to present your website.

This was one of the questions I brought up in the Discord chat in regards to DNS Namespace Resolution. This should be done on the backend and transparently - leaving it to the browser to redirect and parse can get tricky especially if you don’t “code it” properly.

Having an option to redirect to IP address is something I’ve been thinking about.

Check out the content field of uniswap.eth. The IPNS key reads ipns://app.uniswap.org whose IPNS hash points to web2 server. Try also: dig TXT _dnslink.app.uniswap.org

[Courtesy: Esteroids research gang]

What do you mean that IPNS hash points to a web2 server? That’s not what I see:

$ ipfs resolve -r /ipns/app.uniswap.org
/ipfs/QmTMnrnzPdge4DN6Xa948cCH6hXq92qdzwvybpi95hztD7

And that’s also what the dig returns:

;; ANSWER SECTION:
_dnslink.app.uniswap.org. 78    IN      TXT     "dnslink=/ipfs/QmTMnrnzPdge4DN6Xa948cCH6hXq92qdzwvybpi95hztD7"
2 Likes

Come to Esteroids Discord and ask @zz9. I will only confuse you more on this. Literally paraphrasing @zz9.

PS. dig with TXT argument

1 Like