Teach Google Chrome to understand custom TLD

29

5

For development on local machine I've set domains with custom top level domain .nt. But Google Chrome doesn't know about this top level domain, so, if I enter example.nt in location bar, then google doesn't open that location, but opens search with that string (though it shows a bar proposing that I wanted to open location instead of searching if DNS request for that location satisfies). So I can either type http://example.nt, type example.nt/ or open that location to teach Google Chrome, but in any case there will be slash at the end of location. All this is not very convenient, also I don't like this slash, is it possible to tell Google Chrome, that .nt is a normal TLD, so just open locations in with it?

tig

Posted 2011-04-23T16:21:24.780

Reputation: 3 906

Answers

13

According to this bug posted: http://code.google.com/p/chromium/issues/detail?id=30636

Google will not be fixing the issue you have. The only method should be to use http://example.nt I don't see why that won't work.

Sandeep Bansal

Posted 2011-04-23T16:21:24.780

Reputation: 6 168

Read the question. The issue occurs when not using http:://. A potential right answer is that of @eouw0o83hf – asiby – 2017-12-14T03:16:21.727

11

That will work, but people aren't in the habit if typing "http://" in front of everything. When was the last time you wanted to go to a site and started typing "http://%22?

– Asa Ayers – 2011-10-10T16:56:51.703

32For quick lookup for anyone else seeing this question, typing example.nt/ (with a single trailing slash) will cause chrome to treat it as a URL. This is much less annoying than having to add http:// to everything. – eouw0o83hf – 2012-10-04T13:54:24.877

1There's a workaround that just involves updating the search engine settings. See my answer below. – simmbot – 2013-09-17T21:34:51.460

8

Fortunately there is a fairly simple workaround that doesn't involve code.

  1. Go to Settings
  2. Manage search engines...
  3. Add a new search engine and use these as the 3 values:
    a. Default
    b. %s
    c. http://%s/
  4. Make default

simmbot

Posted 2011-04-23T16:21:24.780

Reputation: 181

You can also prefix any search phrase with "?", and the combo Ctrl+E does this for you. – defines – 2014-07-10T15:00:48.687

Here is a server to not break google: https://gist.github.com/rubenwardy/4fdab857ea545ccd362f2ab4a1b4e473 Use http://example.com/?q=%s as the URL instead

– rubenwardy – 2017-07-17T10:26:34.607

4wouldn't this break search? – Louis – 2013-09-17T22:08:49.560

5Google wouldn't be the default anymore. What I also did was set "g" as the shortcut for Google, so that it's almost as seamless as out-of-box google search. – simmbot – 2013-10-07T17:52:18.273

2

Similarly to simmbot, I've created a search engine with a keyword of 'l' (my local TLD is .l). The URL is http://%s.l. Then, I simply type "l mysite" in the address bar and it takes me to mysite.l.

Alternatively, you can simply add a slash at the end, and Chrome won't consider it a search. (See https://stackoverflow.com/a/7877750/974981)

jessepinho

Posted 2011-04-23T16:21:24.780

Reputation: 121

0

I run my own local DNS server (BIND on Linux) which resolves LAN domains using a custom TLD and then recurses non-LAN to OpenDNS. I've never experienced any issues like this. Are you sure your local DNS is correctly resolving .nt domains?

LawrenceC

Posted 2011-04-23T16:21:24.780

Reputation: 63 487

I use /etc/hosts with script generated entries and all domains are resolved correctly. – tig – 2011-04-25T13:23:44.803

The thing is with /etc/hosts is that a program can't resolve things in it and get the nameserver of a specific domain, I believe. e.g., if you have "example.nt" in your hosts file, it can't ask which nameserver is responsible for the ".nt" domain, because there is none. Chrome does some DNS checks to work around DNS providers that redirect bad DNS resolutions to ad pages and I'll bet this has something to do with it. You might try running a local DNS server. – LawrenceC – 2011-04-25T14:33:23.120

But Chrome proposes me to go to location if domain is present in /etc/hosts. Also the question was more on possibility to add .nt to list of "normal top level domains", if I try to go to location aristnraisetnrast.com, which dose not exist, Chrome doesn't search for it, I just get "This webpage is not available", but if I try domain.nt which does exist, than I get a search page. – tig – 2011-04-25T15:56:41.827