Making Browsers Honor the DNS SearchDomain?
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?"
Is http://www/ the location of your internet/intranet server? If so, the server might have changed it's ID.
For example, I can type http://ceejayoz/ to get to this computer's Apache install, as I've got this computer identified as "ceejayoz".
..try
;)
http://news.com.com
o yeah..try to go to "slashdot dot org"
Check whether or not your own hostname has changed. Perhaps an admin changed the dhcp settings on the server.
The technical answer:
:)
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!
Sitting currently before Opera 6.05 on win2k:
Preferences>Network>Server Name Completion>Uncheck 'Try name completion using'
Problem solved, though perhaps not as elegant as getting your current browsers to behave.
troodon.net
When the target server, in this case, http://www.yourcompany.com, is not up, your browser, depending on setting, may start searching for an alternate location.
Why is this under the Mozilla topic? It would be better if it was posted under The Internet or Hardware. For people who would be looking under the Mozilla section for old stories, this story would be off-topic.
Add it to your hosts file.../etc/hosts for Linux and your default Windoze directory for that other OS...
Another advantage of using this method is being able to use other abreviations for frequently visited sites...
it works on my machine
You've just got a new web proxy haven't you?
People keep refering to the technical details of resolving the addresse. I was under the impression that no matter what your setup is, if you don't add on a TLD to your address that the browser will just add it for you out of convenience. This is just one of those IE-isms that Mozilla just copied. I think what your asking is how to disable it, not how to manually add things to your /etc/hosts... I know that I used to use http://www to get to @home's homepage for a while.
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.
-- "Is this death or is this Ohio?"
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.
That's it. I'm no longer part of Team Sanity.
Are you using DHCP in Windows? That's the only thing I can think of that would cause all the applications to change at once.
/etc/resolve.conf you should be good to go. You mentioned nslookup works correctly, but does 'telnet www 80' take you to your originial site as well?
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
SlashSig Karma: Excellent (mostly affected by moderatio
nslookup does not use the system resolver library (gethostbyname and friends). As such, nslookup results won't tell you anything about how the system resolver is behaving.
Check what host "ping www" resolves for a better idea of what the system resolver is up to.
- Damien
I've found that if you're using a site on anything but port 80, IE will choke trying to find it unless you prefix the URL with http://.
Here's the way to make pretty much any browser honor your search domain. This works in IE, Moz(win/linux), Opera (win/linux), Netscape:
.. I seem to remember that that works in some of them.
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
Works for me, Mozilla 1.3a (build 2002120618), sid Debian. I use "www" in the address bar and get the departmental web server. I also use DHCP, so my resolver is configured by what the server tells pump.
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.
--
Given enough personal experience, all stereotypes are shallow.
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
11*43+456^2
It's not a bug, it's a feature!
Reboot!
Smile! You're on candid camera!
On NT/2K/XP, it's /windows/system32/drivers/etc/hosts
This has nothing to do with DNS!
It's a browser feature!
OmniWeb also has it as "Shortcuts" under Preferences.
If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
How can I stop having these horrible, incapacitating flashbacks?!
Keep your packets off my GNU/Girlfriend!
...your browser tacks the .com suffix on to *you*.
Be an *exact* explanation of the problem.
If they're using squid, they can recompile and tell it to not use the internal resolver...otherwise, it'll ignore searchdomains.
May we never see th
http://www.geocities.com/pratiksolanki/
user_pref("browser.fixup.alternate.enabled", false);
X(7): A program for managing terminal windows. See also screen(1).
I found out that our NIS server was giving those exact results. We had NIS clients on all Windows machines and of course all unix/Linux machines were nis too.
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.
If all this should have a reason, we would be the last to know.
I'm just trying to figure out how you tested that combination...
alias uptime="echo '5:33pm up 22342352324 days, 6:28, 2124315623 users, load average: 2432.40, 12312.31, 123123.19'"
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-
Consider yourself blessed if you are sneezed on by a dragon and only get wet, it could have been a fireball.
The abhorrent behaviour of Mozilla regarding this is to play to the lowest denominator (i.e. clueless name completion).
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.
IANAL but write like a drunk one.