Error loading websites
From MozillaZine Knowledge Base
This article offers solutions to errors you may receive in Firefox or Mozilla Suite/SeaMonkey when attempting to connect to some or all websites. Error messages may include "The document contains no data" and "The connection was refused when attempting to contact..." or an error page may tell you that the server could not be found or that the connection has timed out.
If you can't get any website to load immediately after updating your browser, it is almost certainly your firewall or other security software blocking the connection.
Error loading any website
If Firefox/Mozilla Suite/SeaMonkey will not connect to any website:
For specific connection or page load issues, see the section below that best describes your problem.
Only Mozilla applications are having problems
If your Mozilla application can't connect to websites but other programs such as Internet Explorer can...
Make sure your connection settings are correct. If you have Internet Explorer and it works, compare Internet Explorer's connection settings (e.g., Control Panel -> Internet Options -> Connections: LAN) to those of Firefox (Tools -> Options -> Advanced -> Network / Connection -> Settings) or Mozilla Suite/SeaMonkey (Edit -> Preferences -> Advanced -> Proxies).
If your connection settings are not correct but any changes you try to make are not saved after restarting your Mozilla application, make sure you don't have a utility program such as "Hide IP Platinum" that modifies your connection settings. Even if the utility is no longer installed, the user.js file may still contain the modified settings . To resolve this problem, open the profile folder and look for a user.js file. If found, either remove the user.js file or edit it to remove any "proxy" settings it may contain as outlined here, then reset the connection settings.
Another possible solution reported by a user who had recently removed "HideMyIP Premium" from his computer, was to reinstall the program and de-select the service. 
Make sure that your firewall program is configured to allow internet access to Firefox/Mozilla Suite/SeaMonkey. The Firewalls article includes configuration information on some of the more popular software firewalls.
Most firewalls will ask you whether to allow a new program to connect to the internet, so it is important to always allow access for new or updated Mozilla applications. Even if you see permission in the firewall list of permitted programs, it could be for the previous program version, as firewalls require permission to allow an updated program to access the internet .
Some firewalls can be rather tricky to configure, or even to disable or uninstall. In some cases they may continue running silently after supposedly being uninstalled or disabled. They may also have bugs that prevent the Internet access list from being updated correctly. The "EnumProcess" tool for Windows, available here, enumerates all running processes and identifies firewall processes. It also identifies some of the other security programs (but not necessarily all) that are known to cause problems.
Firewalls have many ways of blocking Internet access. Some firewalls and other security software manage all aspects of Internet connections and Web traffic, including domain-name service (DNS), access to secure Web sites, and browser access to your computer. Kaspersky software can block domain-name service (DNS) for some programs but not others.  You must allow DNS access for normal Web browsing.
Other security programs
Besides personal firewalls, other security programs, including Norton or Symantec Antivirus,   can block internet access or cause other connection issues, especially after the browser is updated. Older versions of Panda Anti-virus can cause connection problems. (Information on this is no longer available on the Pandasoft Web site.)
Note that some antivirus packages include web scanning features, such as AVG v9's "Link Scanner", Avast! "Web Shield" and Kaspersky "Web Anti-Virus", that process all HTTP traffic, which may cause intermittent timeouts and failed page loads (see below, under Websites randomly do not load) .
Http and P2P blocking software, such as Peerguardian or Peerblock may block websites from loading if their IP happens to appear on a block list. As with other security programs disabling it while you diagnose networking issues is advisable.
By default, Firefox/Mozilla Suite/SeaMonkey will use IPv6 ("Internet Protocol version 6") if it is available. However, the user's local network or Internet environment may not be equipped to handle IPv6 and you may see an "Address not found" or "Server not found" error for many websites. (Read bug 414197 and this forum discussion for examples.)
To disable IPv6, change the preference network.dns.disableIPv6 from "false" to true . Here are the steps:
If this doesn't work, you can re-enable IPv6 by resetting the preference to "false" (double-click to toggle).
DNS prefetching is performed to resolve domain names to IP addresses while loading web pages. If a page includes links, images, or other content from different domains, multiple DNS requests will be made at once. This may break the DNS forwarder in several different routers and you may see "Server not found" errors for many websites.   To disable DNS prefetching, create a new boolean preference named network.dns.disablePrefetch in about:config and set it to true, as follows:
If this doesn't help you can re-enable DNS prefetching by resetting the preference to "false" (double-click to toggle).
Accessing a router
All programs are having problems
Diagnosing Windows network connections
For help with network and Internet connections read this Microsoft article: "How to troubleshoot TCP/IP connectivity with Windows XP". There is also a Windows 2000 version of the article. Much of the article is also applicable to other operating systems, with some variations.
Most routers can be configured with rather complex Internet access restrictions. For example, specific Websites can be blocked, and specific computers can be blocked at certain times of the day. Access to HTTP sites or HTTPS (secure) sites can be blocked. Access to certain services such as domain-name resolution (which is required for normal browsing) can also be blocked.
In combination, the rules could also appear to be erratic. For example, if access were determined by IP address, the rules might appear to change when IP addresses change.
For help with router configuration, contact your system administrator or refer to your router's documentation. If possible, see if you can connect without hooking up to the router.
Viewing system logs
System event logs may contain information on important events such as service failures, and application updates and failures. For an example of an Internet service interruption, read this. To view the Windows Event Viewer, Start > Run > eventvwr.
If your domain name system server (DNS server) becomes slow, you may be unable to view some or all websites. There is a good explanation here of how the DNS system works and what can go wrong with it. Your DNS server translates web addresses (URLs) that you enter in your browser, into IP addresses that are used on the Internet. If you can open a website by entering the IP address into the Location Bar but not the URL. For example, if an IP address for Google such as http://18.104.22.168/ or http://22.214.171.124/ works but http://www.google.com doesn't, you may have a DNS problem.
Google has provided a very good guide to configuring and diagnosing DNS. You can also check the speed of your DNS server by downloading the "wdnslookup" utility for Windows, available here, or by using program "nslookup", which is part of most operating systems. Remember that both local DNS servers and your own computer cache the results, so a lookup may be much slower on the first attempt. For accurate results you should use the "Clear Cache" button in the wdnslookup utility before resolving the host name you enter. This will clear the DNS cache in your computer, but not the server cache. See this forum post for additional information.
As a first step toward fixing the problem, you should contact your ISP. You can also use an alternative service such as OpenDNS (discussed here), Google Public DNS, or TreeWalk. Other ways to find a more reliable service are discussed here. In some cases replacing your DNS may result in a dramatic, general improvement in Internet speed. As a last resort, it may help to increase the DNS query timeout for the operating system, although this will not result in any improvement in speed. Directions for Windows 2000 are shown here.
A related DNS server issue that can result in failure of repeated attempts to open certain websites is that Windows 2000 and XP cache unsuccessful DNS lookup attempts. This means that you may not be able to view a particular website until the cached result expires. By default, the expiration time is 5 minutes. As a workaround, you can flush the DNS cache (For Windows XP, "Start -> Run -> ipconfig /flushdns") then try loading the site again. If you want, you can permanently disable negative caching by editing the registry, as shown here. The registry entry is officially documented here (Windows 2000) and here (Windows XP).
Usually if Firefox is having DNS problems, other programs such as nslookup and other Web browsers will also have the same problem, but this is not always the case. A setup with an incorrect address for the DNS service can cause systemic delays for Firefox in some cases. Security software can also block DNS service for Firefox.
Are others also experiencing problems
You can check if the problem is global in nature by seeing if another server can see it
Some server health reports for sites that would affect all MozillaZine users.
If programs other than Firefox/Mozilla Suite/SeaMonkey are also having problems connecting, the problem may be with your Internet Service Provider. Contact them.
Spyware and other malware
It is possible that Spyware or other malware (malicious software) is causing connection problems. Your antivirus and security software may not detect the malware so you should install and run another anti-malware application or visit a forum that specializes in detecting and removing malicious software from your computer. Some recommended applications and forums are listed here.
Error loading some websites
If Firefox or Mozilla Suite/SeaMonkey can connect to some websites, but not others:
Websites randomly do not load
If Firefox or Mozilla Suite/SeaMonkey randomly cannot connect to websites:
Related bug reports