10

How can I prevent safari to redirect the user to the google search page for addresses with custom top-level domains?

Given an address of the type http://application.test where test is a primary zone on our intranet, if I enter either:

Then Safari correctly resolves the name and opens the page, if I enter:

  • application.test

Then Safari assumes it is a search query and redirects the user to the google search page.

Is it possible to prevent this in any way which does not involve the user itself?

2
  • May be you should turn off web suggestions and/or use private mode to go to your intranet domains
    – Eir Nym
    Mar 9, 2013 at 22:46
  • Oh this is so annoying! I just went to app1.test, google search. Hm. So I prefixed it with http://, voila, but I wrote bad url. So I corrected it to app2.test, GOOGLE EFFING SEARCH. Goddammit. Jan 25, 2018 at 15:51

3 Answers 3

3

To just avoid connecting to Google, open Safari's preferences, click on "Search" and then change the search engine to something else.

To prevent that domain from going to any search engine, add a Safari bookmark with the full URL (including the http:// or https:// protocol). Once the domain is bookmarked it should come up when the user begins typing the name in the address bar.

The user's machine will still need a way to route traffic to the custom domain, either via DNS settings, or by adding an entry to the /etc/hosts file on the user's machine.

0

Yes, it frustrates me too, but I'm afraid that there is no easy way to accomplish what you need. Possible workarounds I found are:

  • use a proper domain name, preferably the one you already own. From my experience, this is a common practice, instead of using made-up TLDs.
  • use Firefox, which attempts to resolve custom TLDs.
1
0

You can just use a domain suffix that is on the exclusion list, as unfortunately you cannot manually specify one. I'm currently using .mil, which works fine. Of course, in my mind this is nothing to do with the US military, but purely stands for "my internal localhost". I would use .dev but it enforces https, which may not work without extra tomfoolery.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .