Making Browsers Honor the DNS SearchDomain? 48
Craig A. Smith asks: "I've always been able to use simply 'http://www' to get to my company's web site, presumably because my default search domain was 'mycompany.com.' Suddenly my browser started taking me to 'www.www.com' instead. This happened simultaneously in all browsers (tested Mozilla, IE, NS4.7 and NS7.0) an two platforms (RedHat7.2 and Win2k). The odd thing is the command 'nslookup www' (or dig or host) behaves as desired and still resolves to www.mycompany.com so I don't think this is a DNS issue. I've tried various /etc/resolv.conf settings with no luck ('domain mycompany.com' and 'search mycompany.com').
How do I get my browser to apply the default domain before tacking on the www prefix and .com suffix?"
intranet (Score:1)
For example, I can type http://ceejayoz/ to get to this computer's Apache install, as I've got this computer identified as "ceejayoz".
Re:intranet (Score:1)
Re:intranet (Score:1)
A better example is a webserver named buffy on my network. It is just a local webserver for a small group, all in the same domain, to use. The domain is localgroup.city.state.branch.division.company.com and all of the machines have this in their dns search order. Ping buffy and it will resolve to buffy.localgroup.city.state.branch.division.compa
In the case of the browser, typing buffy should do the same thing, however, the browser is assuming that the user has made a mistake and tries to help him/her out by appending the most common webserver prefix/suffix www and com.
I don't think the solution is to stop being lazy. The solution is get the browser to not mess with my entry. It is a good server name and perfectly valid according to all DNS rules. I want my software to at least give me the benefit of the doubt. How about it's first assumption is that I know what I'm doing. Once that is proven false then try to help.
(I can't help but be reminded of the overly helpful man who helps the old lady across the street, despite her insistence that she doesn't want to cross the street!)
Re:intranet (Score:1)
People think they are being funny.. (Score:1)
http://news.com.com
o yeah..try to go to "slashdot dot org"
Your own hostname? (Score:2)
DNS (Score:2, Insightful)
It's a lot more likely that something changed in the way your machine is resolving DNS. Go talk to your netadmin.
The real answer:
Nice Ask-Slashdot troll!
Try Opera and disable server name completion? (Score:3, Informative)
Preferences>Network>Server Name Completion>Uncheck 'Try name completion using'
Problem solved, though perhaps not as elegant as getting your current browsers to behave.
Finally, somebody who has a clue (Score:2)
This has nothing to do with DNS!
It's a browser feature!
OmniWeb also has it as "Shortcuts" under Preferences.
Re:Finally, somebody who has a clue (Score:2)
Search prefix:P Look in
In
Re:Finally, somebody who has a clue (Score:3, Informative)
Nitwit.
Re:Finally, somebody who has a clue (Score:2)
Only read the comment, not the posting:P
Dirty habbit.
Is that server up? (Score:3, Interesting)
Re:Right section, wrong topic (Score:2, Funny)
quick fix... (Score:2, Informative)
Another advantage of using this method is being able to use other abreviations for frequently visited sites...
Re:quick fix... (Score:2)
Um, I thought the whole point of DNS was so you didn't have to populate/maintain the hosts file in every computer.
Re:quick fix... (Score:2)
For instance, the company I used to work for would have addresses for servers like d12stg034.atlanta.xxx.com
A DNS is not an excuse for not maintaining a hosts file...
Re:quick fix... (Score:2)
typical reply (Score:3, Funny)
Proxy? (Score:5, Insightful)
My thought too (Score:3, Informative)
If they're using squid, they can recompile and tell it to not use the internal resolver...otherwise, it'll ignore searchdomains.
What changed? (Score:2)
Here, I can just type "www" and get the local server. Mozilla seems to change that to "http://www/". If I "ping www" I get "Pinging www.companyname.com [blah blah]" but the browser doesn't show "http:/www.companyname.com/". So I don't know how Mozilla or DNS or the resolver or anything is doing this, it just works; if it stopped working, I'd ask what changed.
User Interface Feature (Score:1)
Not that I can tell you how to disable this feature... all I can say is that server-side approaches seem silly... it's smart-browsings fault, and Mozilla should have an option somewhere.
Re:User Interface Feature (Score:2)
Uh, it has absolutely nothing to do with the browser. This is a feature of the resolver.
E.g. in
And I have an A record for box.private.domain.com on my local DNS server.
Re:User Interface Feature (Score:2)
This is just one of those IE-isms that Mozilla just copied.
Not exactly. Netscape has had this sort of feature (type in a single-segment name and it'll automatically put 'www' before it and '.com' after it, for example) since I first used Netscape Communicator 2.0 in 1996.
It's probably your browser (Score:3, Insightful)
I've noticed that browsers haven't required a http:// preceding the address for a long time, nor a slash on the end. While I do this out of habit, it seems most users aren't even accustomed to putting the protocol name in front of a name or address.
I would suggest looking through your browser's documentation and configuration, as there's probably an option to turn off the offending problem.
Note that one way to be sure, however, is to try and ping the server in question. Even if the server doesn't reply to ping requests, ping should give you some sort of address which you can compare to the one you want, without any user-hostility getting in your way.
IE does still require http:// at times (Score:4, Informative)
DCHP & Other Things (Score:5, Informative)
Linux side, I believe if you have 'domain' configured properly in
A few other things:
- Consider using keywords instead of relying upon DNS to do magic for you. Create a bookmark w/ your company's website & give it the keyword 'www'. That should fix you up. (Keywords are the most currently underrated feature in the browser. Especially in regards to their ability to do searches.)
- You want to consider the above not only for convience, but also so your companies tracking doesn't get screwed up a little. When you hit the site with just 'www' (instead of 'www.foo.com') you drop your cookies. Most sites use cookies at least to track unique visitors if nothing else, and you're probably causing a minor bit of unintended cookie churn.
- Another poster mentioned how browsers require neither 'http://', nor the trailing slash (e.g. on http://www.slashdot.org/). Defaulting to http probably isn't that bad. Especially inside a web browser. After all, it's highly unlikely the user intended gopher://. There is a difference on the trailing slash & it's better to include. If you try to hit a server w/o the trailing slash, you'll simply get a redirect from the server to the version *with* a slash. On broadband, it's totally trival, but for narrowband users, it is noticable. Something to worth keeping in mind for the URLs your link to.
-Bill
Re:DCHP & Other Things (Score:3, Informative)
That's not how I understand it -- after all, there isn't any possible path to request for an URL such as http://www.example.com other than "/". *fx: looks up RFC* Ah, there it is, from RFC 2616 "HTTP/1.1":
(Emphasis added)
You were probably thinking of paths such as http://www.example.com/some/path , which (if they are directories) typically get turned into redirects to http://www.example.com/some/path/ . But a bare http://www.example.com is legal and equivalent to http://www.example.com/ ; the HTTP request in either case should be "GET / HTTP/1.1" by my reading of the spec.
nslookup is a poor test (Score:3, Informative)
Check what host "ping www" resolves for a better idea of what the system resolver is up to.
- Damien
How to do it: (Score:5, Informative)
Type as: http://www/
You can also try just typing www/
Also if you disable name completion which I know you can do in Opera (not sure about the others) then just plain www will work.
Enjoy,
~GoRK
WFM (Score:1)
My guess is that either:
a) Your DHCP server isn't giving you a good set of search domains, or
b) It's a funky Windows-ism, or
c) It's a bug in Moz that got fixed before my version.
I don't have windows on this machine, I tested it on a nearby windows (95 or 98) machine, and got the same problem you did. Thus, I'd conclude offhand (since we share the same dhcp server) that it's b) It's a funky Windows-ism or c) It's a bug in Moz that got fixed before my version.. Maybe shelling out money for a new version of Windows would fix it, or perhaps downloading a recent nightly build?
Wait. Analyzing further, it might well be
d) pump is integrating the search path from the existing resolv.conf when it gets data, I'm assuming from a dhcp server that doesn't give data on the search domains.
Thus, the answer might well be that you just need to tap your admin on the shoulder and tell them that they need to add info to DHCP server's response so that you get good search info. This should fix it for Moz, since it is known to work fine with a good search path in the version I'm using. Don't know about IE or other browsers, though.
Re:WFM (Score:2)
We don't use dhcp (small company). I'd think it may have to do with 'internet keywords' in smart browsing.
Re:WFM (Score:1)
Niftyfun word confections.
The Internet keywords is another thing entirely from what's discussed in the article. I'm not quite certain how exactly it functions; it seems to fetch urls based on what an external entity (or maybe a config file) assigns to the keywords. http://www.mozilla.org/docs/end-user/internet-key
Disable smart browsing features (Score:3, Informative)
Your browser will probably go back to normal if look for and disable any features called "auto search", or "smart [browsing/urls/etc]". As a side note, one of the really annoying things about Netscape on Unix (at least the old 4.x versions), is that they actually read
Dear Slashdot: (Score:2)
its a hidden preference (Score:2)
http://www.geocities.com/pratiksolanki/ [geocities.com]
user_pref("browser.fixup.alternate.enabled", false);
NIS lookups (Score:1)
IE on redhat... (Score:1)
man resolv.conf (Score:1)
I dropped search hal-pc.org into my resolv.conf. http://www failed to work in mozilla. Dropping to a shell and running lynx http://www worked, I was presented with www.hal-pc.org's website instead of www.com. Im running mozilla 1.0, I have ran thru most of the settings (without diving into a text editor) and havent found a disable for the automatic .com suffix.
********
search
Search list for host-name lookup. The search list is normally determined from the local domain name; by default, it contains only the local domain name. This may be changed by listing the desired domain search path following the search keyword with spaces or tabs separating the names. Most resolver queries will be attempted using each component of the search path in turn until a match is found. Note that this process may be slow and will generate a lot of network traffic if the servers for the listed domains are not local, and that queries will time out if no server is available for one of the domains.
The search list is currently limited to six domains with a total of 256 characters.
*********
DRACO-
Mozilla does not honour normal DNS resolution. (Score:1)
There is quite a liveley debate in bugzilla regarding this "feature".
In the one hand are the clueless-lets-help-the stoopid-newbies crowd that believe such a thing is desirable.
In the other hand are the technically competent that wish Mozilla will just follow common sense and used the name resolver libraries every other single program in your computer uses. No auto-completion.
You think this is trivial?
Let say you type bobby in your browser, then Mozilla dutifully will try to contact who knows what machines, one them perhaps www.bobby.com.
If admin at www.bobby.com is a malicious person he can build a pretty accurate picture of your bobby's file structure checking his logs of what you are trying to access.
A couple of poeple in bugzilla had made that point but the lets-be-nice-to-the stoopid-newbie guys don't let this thing die the painful death it deserves.