為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How can I get Firefox to stop using www. from a cached prefix?

  • 5 回覆
  • 2 有這個問題
  • 16 次檢視
  • 最近回覆由 LaurieMcC

more options

In the past month or so, I've noticed that Firefox has begun prefixing "www." to the address of my web site when I type in its address without the "www.," which is not needed: when I type "smbhax.com" in the address bar--and without selecting any of the auto-complete suggestions that appear below it--I'm taken to "http://www.smbhax.com"; but I don't want that useless "www" to be there.

This seems to be some sort of URL caching feature, and I guess a new-ish one. I was able to reproduce the problem with another site of mine that shouldn't need the "www":

  1. Type "paleface.net" in the address bar. I'm taken to "http://paleface.net," as expected.
  2. Type "www.paleface.net" in the address bar. I'm taken to "http://www.paleface.net," as expected.
  3. Type "paleface.net" in the address bar.

--> Now I'm taken to "http://www.paleface.net" instead of "http://paleface.net," which is the address I typed and the address to which I wanted to go.

I've tried turning off both keyword.enabled and browser.fixup.alternate.enabled in about:config as described here -- https://support.mozilla.org/en-US/kb/search-web-address-bar -- and the problem still occurs.

I've used Firefox for years with these sites, and I didn't see this automatic adding of "www." until the past month or so.

I have *not* tried clearing my browser history etc to see if that temporarily fixes the problem.

Update: I've tried the "Forget about this site" procedure suggested below, and it does clear the problem on a single-site basis...until you've gone to that domain with a "www." prefix again at some point.

In the past month or so, I've noticed that Firefox has begun prefixing "www." to the address of my web site when I type in its address without the "www.," which is not needed: when I type "smbhax.com" in the address bar--and without selecting any of the auto-complete suggestions that appear below it--I'm taken to "http://www.smbhax.com"; but I don't want that useless "www" to be there. This seems to be some sort of URL caching feature, and I guess a new-ish one. I was able to reproduce the problem with another site of mine that shouldn't need the "www": # Type "paleface.net" in the address bar. I'm taken to "http://paleface.net," as expected. # Type "www.paleface.net" in the address bar. I'm taken to "http://www.paleface.net," as expected. # Type "paleface.net" in the address bar. --> Now I'm taken to "http://www.paleface.net" instead of "http://paleface.net," which is the address I typed and the address to which I wanted to go. I've tried turning off both keyword.enabled and browser.fixup.alternate.enabled in about:config as described here -- https://support.mozilla.org/en-US/kb/search-web-address-bar -- and the problem still occurs. I've used Firefox for years with these sites, and I didn't see this automatic adding of "www." until the past month or so. I have *not* tried clearing my browser history etc to see if that temporarily fixes the problem. Update: I've tried the "Forget about this site" procedure suggested below, and it does clear the problem on a single-site basis...until you've gone to that domain with a "www." prefix again at some point.

由 smbhax 於 修改

所有回覆 (5)

more options

You can remove all stored data from a specific domain via "Forget About This Site" in the right-click context menu of an history entry (Show All History or History sidebar).

Using "Forget About This Site" will remove everything like bookmarks, cookies, passwords, cache, history, and exceptions from that domain, so be cautious and if you have a password or other data from that domain that you do not want to lose then make a note of those passwords and bookmarks. You can't recover from that "forget" unless you have a backup of the affected files.

It doesn't have any lasting effect, so if you revisit such a 'forgotten' website then data from that website will be saved once again.

more options

I tried that, and it does clear the issue on a single-site basis--until you've hit that domain with a "www." prefix again at some point. It isn't a true solution to the problem, but it's good to know! Thanks for pointing it out.

由 smbhax 於 修改

more options

Did you try to set the Boolean pref browser.urlbar.autoFill to false on the about:config page?

See "Prevent Firefox from automatically completing URLs":

more options

Ah, setting browser.urlbar.autoFill to False in about:config prevents the "www." prefix behavior. Of course, I don't really want to turn autofill off because I rely on it a lot.

I guess maybe there was a recent change to how autofill works, because I've always had it on and it didn't use to do this.

Also, it works somewhat unusually in this case because the "www." does not appear as you are typing the address; it only appears--along with "http://"--after you hit ENTER. So as far as you can tell, you're set to go to [domain].com correctly, but then you hit ENTER and find out Firefox had other ideas about where to send you. It isn't so much a fill as a switcheroo.

由 smbhax 於 修改

more options

I am having the same issue. If I copy in a URL that starts with "http://" and then hit enter, Firefox swaps the "http://" for "www" so I get an error message that the page or server or whatever can't be found. I've tried everything that's been suggested here and nothing works for me. I'm using version 10.0.12. This wasn't an issue with earlier versions. It's back to IE I go until I can find a resolution for this issue. Extremely frustrating.