DIY .bit resolution

https://www.namecoin.org/dot-bit/
Post Reply
FULl
Posts: 27
Joined: Wed Aug 27, 2014 1:59 am
os: windows

DIY .bit resolution

Post by FULl »

Hi,

I'm using http-equiv="refresh" content="0; url=http://domainname.com/" /> to redirect visitors from one page to another site, and now I want to do something a little different but I don't know how.

For example I want my website's name to be 'Polka.bit', & I want to use the .bit address/page as the main website.

In this example, I also have the Polka.com, & I want visitors who go there to be automatically redirected to Polka.bit. I can't do this in a DNS record since .bit addresses won't resolve (unless users are using an OpenNIC DNS server or a browser plugin, which I have to assume they're not).

On Polka.com's homepage, I have http-equiv="refresh" content="0; url=http://Polka.bit/" /> to redirect them to the .bit address, but it won't work for a majority of users unless there's a way to send users to this link via an OpenNIC DNS server although their network may not be configured to use it.

If this is possible somehow, I imagine I could implement it on all the links on the .bit site so that they always choose the OpenNIC DNS to resolve, thus enabling the user to continue browsing the .bit site.

If there's no way to code this in html like I'm wanting to, I'm wondering about how OpenNIC facilitates the .bit resolution to their users, as a potential solution.

Or if I could install some kind of open source proxy like .pe sites use use & deliver the .bit site through it when visitors go to my .com page, that would be acceptable.

I have no idea, however how OpenNIC's backend works, nor do I know how to run a proxy to resolve .bit addresses via a custom tld type suffix.

Could someone give me a hand with this?

Many thanks.

-F

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: DIY .bit resolution

Post by biolizard89 »

FULl wrote:Hi,

I'm using http-equiv="refresh" content="0; url=http://domainname.com/" /> to redirect visitors from one page to another site, and now I want to do something a little different but I don't know how.

For example I want my website's name to be 'Polka.bit', & I want to use the .bit address/page as the main website.

In this example, I also have the Polka.com, & I want visitors who go there to be automatically redirected to Polka.bit. I can't do this in a DNS record since .bit addresses won't resolve (unless users are using an OpenNIC DNS server or a browser plugin, which I have to assume they're not).

On Polka.com's homepage, I have http-equiv="refresh" content="0; url=http://Polka.bit/" /> to redirect them to the .bit address, but it won't work for a majority of users unless there's a way to send users to this link via an OpenNIC DNS server although their network may not be configured to use it.

If this is possible somehow, I imagine I could implement it on all the links on the .bit site so that they always choose the OpenNIC DNS to resolve, thus enabling the user to continue browsing the .bit site.

If there's no way to code this in html like I'm wanting to, I'm wondering about how OpenNIC facilitates the .bit resolution to their users, as a potential solution.

Or if I could install some kind of open source proxy like .pe sites use use & deliver the .bit site through it when visitors go to my .com page, that would be acceptable.

I have no idea, however how OpenNIC's backend works, nor do I know how to run a proxy to resolve .bit addresses via a custom tld type suffix.

Could someone give me a hand with this?

Many thanks.

-F
Basically, you want to check whether a .bit site is reachable and change your behavior based on that? I think a Javascript CORS request would be able to do that. Try to connect to your .bit website via CORS; if it's reachable, then redirect your users via Javascript.

I might be willing to code an example Javascript snippet that detects .bit support (or maybe even fingerprints certain .bit implementations) if someone's willing to post a bounty.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

FULl
Posts: 27
Joined: Wed Aug 27, 2014 1:59 am
os: windows

Re: DIY .bit resolution

Post by FULl »

I found this, which lists some options I'll give a shot.

https://wiki.namecoin.info/index.php?ti ... y_Software

pitbull
Posts: 24
Joined: Wed Oct 23, 2013 4:52 pm
os: linux

Re: DIY .bit resolution

Post by pitbull »

If you're using apache, I use mod_proxy and mod_rewrite to serve up requests for bit.pe. You won't be able to have a user click on a .bit link and have it work for them unless you install a web based proxy service on your main.com domain, and have it default to showing your .bit page.

Post Reply