Have you ever had a letter returned to the sender?
The same thing can happen with pages on your website. Just as a postal worker can’t deliver a letter made out to a nonexistent postal address, a web browser can’t request a page from a server if a referring link uses a nonexistent URL address.
当这种情况发生时,浏览器会显示404埃罗r message. For an ecommerce store, a 404 error can ruin the customer experience and result in lost sales. Learn how to find and fix problems that cause 404 errors on your website.
Shortcuts
What is a 404 error?
一个404错误发生在一个web浏览器请求一个page from a website’s server, but the server can’t find a webpage associated with the requested URL. When the error occurs, the browser shows a status page with an http status code indicating the error type—referred to in this case as a 404 error message.
404 errors indicate a problem accessing a page through the requested web address—not an issue with the web server hosting the page—so encountering a 404 error on your site means your web hosting server is functioning normally. The problem, instead, has to do with the requested page or URL.
What are some causes of 404 errors?
404 errors can result from mistakes on your website, a referring website, or user errors. Here are a few common causes:
- Broken links.If there’s a typo or other error in the URL associated with a specific link, the server returns a 404 error code.
- Deleted pages.A link pointing to a deleted page is known as a dead link. If you remove a page from your website, clicking on an internal or external link referring to the deleted page generates a 404 error message.
- Client error.404 errors can also result from user error. If a user enters a wrong URL associated with your domain into their address bar, they may see a 404 error informing them the page doesn’t exist.
- Caching issues.If data saved to a user’s browser cache after a specific site visit conflicts with updates made to the site, the user might encounter a 404 error. Clearing the cache can resolve this type of problem.
- Permalink or file issues.Problems with your site’s links, file permissions, or configuration files can result in sitewide 404 errors.
You can minimize 404 errors using what’s known as a 301 redirect. For example, if you delete a page or move a resource, you can use a redirect to send users who attempt to access the old URL to the correct location. If there’s an issue with the redirect, however, a 404 error displays.
How to find 404 errors on your website
You can use tools to check for 404 errors and identify dead or broken links on your site. Some tools can also identify broken backlinks—links on other websites pointing to a nonexistent URL attached to your site’s domain name.
Here are a few popular options:
Google Search Console
Google Search Consolelets you monitor site performance and identify errors. Use it to view all URLs that generate 404 errors on your site by logging in and selecting “Coverage” and then “Errors.” You can also use the “Inspect URL” tool to find the location of the broken link. If the broken link is on your site, you can fix it. If it’s an external link, you can contact the referring site to request a correction or set up a redirect.
Broken Link Checker
Broken Link Checkeris a free online tool that will crawl your website and identify any links that refer to bad URLs associated with your domain or another website.
Unlike Google Search Console, Broken Link Checker can’t identify broken inbound links, i.e., links on other websites that refer to a nonexistent URL associated with your domain.
SEOAnt Broken Link Redirect
SEOAnt Broken Link Redirectis an app that can run daily or weekly checks for 404 errors on your site. It can also minimize 404 errors by auto-redirecting users to a specified URL as soon as an error occurs.
Why should you fix 404 errors?
Failure to fix 404 errors can weaken search engine rankings, negatively affect the user experience, and decrease traffic to your site:
- Poor SEO performance.Broken internal links can affect a search engine’s ability to crawl your site, negatively affecting your website’s rankings on search engine results pages (SERPs).
- Decreased site traffic.Inbound links—or links hosted on other websites that point to your site—can boost your search engine performance and increase traffic to your site. If those links lead to a 404 error, you lose these benefits.
- Poor user experience.Encountering a 404 error can be frustrating and discourage users from exploring your website further. This can also undermine trust in your brand, particularly if it results from broken internal links or occurs frequently.
How to fix a 404 error
- Fix broken links
- Create redirects
- Fix permalink issues
- Fix file permissions
- Disable your .htacess file
It’s impossible to eliminate 404 errors completely: For instance, if an internet user attempts to visit your site by typing the wrong URL into a search bar, they’ll encounter an error. However, you can fix errors resulting from issues on your site and use strategic redirects to minimize others. Here’s how to fix different types of 404 errors.
1. Fix broken links
If the 404 error results from a mistyped URL, the solution is simple: Just correct the URL in the back end of yourcontent management system (CMS)or website platform. If the page associated with the request URL has been moved or deleted, you may instead set up a redirect as outlined in the next step.
2. Create redirects
If a 404 error results from moved or deleted content, you can set up a redirect to automatically refer users to the new location. This strategy can ensure that external links referring to the missing page don’t generate a 404 error. Sometimes, you might also set up redirects in anticipation of user errors. For example,shopify.com/helpredirects to the correct URL,help.shopify.com/en.
You can set up a redirect using your CMS or website platform. Steps vary based on the provider, so consult your platform’shelp centerfor specific instructions. You can also use aredirection plug-in创建散装或自动重定向。
3. Fix permalink issues
A permalink (or permanent link) is a full URL for a website or web page. Installing a new plug-in, restoring your site from backup, or updating your website platform can interfere with the permalinks on your site, causing sitewide 404 errors. If you’re experiencing errors on multiple pages, log in to your CMS, navigate to permalink settings, and follow your provider’s instructions to update settings.
4. Fix file permissions
File permissions tell your server which users can access specific types of content. If there’s a mistake in your permission settings, users may encounter a 404 error. To check your file permissions, log in to your CMS, navigate to file permissions, and confirm that content isn’t restricted to certain user groups. If it is, update your permission settings to fix the error.
5. Disable your .htacess file
A .htacess file is a high-level configuration file that controls redirects, security, and permissions. If your file is corrupted, you may experience sitewide 404 errors. You can fix this with the following steps:
- Back up your site.
- Connect to your web server using a secure file transfer protocol (SFTP.)
- Disable the .htacess file.
- Rename the disabled file to prevent your site from connecting to it.
- Generate a new .htaccess file.
- Save your changes.
404 error FAQ
What does a 404 error mean?
A 404 error means your web server can’t find a specific page on your website. This type of error occurs when there’s a problem with a URL or with the page associated with that URL.
Is it necessary to redirect a page that generates a 404 error?
A redirect to fix a 404 error caused by deleted or moved content ensures users attempting to access your site using the old URL don’t encounter the error. If the error results from a typo in a URL on your site or an issue with site permissions or settings, you can fix the source issue instead.
Is it possible to customize the appearance of a 404 error page?
Yes. You can customize a 404 status page to reflect your brand voice and improve user experience. Some businesses direct users to their website’s search function or provide links to high-level pages that contain the requested resource.