- Home
- Web Development
- Learn How to Fix Broken Links
How to Fix Broken Links: From 404 to Flawless
Learning how to fix broken links will ensure that search engine bots can effortlessly crawl and index your site. Regardless of how they happened, broken links will confuse your visitors and make accessing the information they need difficult.
Call 888-601-5359 to speak with a strategist about how WebFX can improve your website, or keep reading to learn how to fix broken links and get your site fully functional in no time.
Let’s answer your questions on how to fix broken links!
- What is a broken link?
- How to find broken links (with tools!)
- How to fix a broken link for a deleted/moved page
- How to fix a 400 bad request
- How to fix a broken link from a domain change
- Why do broken links matter?
- Is there any positive I can do for a broken link?
What is a broken link
What are broken links?
A broken link is a hyperlink on a website that no longer works as intended. Users who click on it encounter an error, such as ‘404 Not Found’ page, instead of reaching the intended content.
You get both broken internal links and external ones. While there is little you can do about websites that link incorrectly to you other than possibly reaching out to let them know there are plenty of ways to fix a broken internal link.
So what does a broken link look like? If you click it, often you’ll get a page that looks something like this:
The user now doesn’t have access to the information they wanted, and they have basically reached a dead end. When a link is broken, it disrupts the user’s journey and might cause them to continue with another brand.
Here are the common types of errors you get:
Error Number | Type of Error |
Error 400 | Bad request |
Error 401 | Authorization required |
Error 403 | Forbidden |
Error 404 | Not found |
Error 410 | Gone |
Why do links get broken?
There are a few main reasons this type of thing happens on a website. The page was moved to a new URL, and the links to it have not been updated, or the link was incorrectly formatted by human error. It might also be a side effect of larger activity, such as a major site update or domain change.
So why and what is a broken link on a website? Here are a few different types of broken links:
Find broken links with a site audit
Before you start fixing links, you have to identify where, exactly, your issues lie. And even if you’ve noticed one or two that you know aren’t working, it’s best to make a comprehensive list and address them all at one time.
You can go through your website manually, but it does save time to use a tool! Here are a few to get you started.
Broken link checker tools
Free broken link checker tools:
Plug-ins for Content Management System (CMS) users
How to fix a broken link for deleted or moved pages
A deleted page is a webpage that has been intentionally removed from a website. This can occur for several reasons, such as outdated content, no longer needing the page, or a site restructure. A moved page is where the webpage has simply been relocated and has a different URL. This type of broken internal links does happen occasionally during a site redesign or if you migrate to a new platform.
Common ways to fix these types of broken links include:
- Set-up a redirect: You can use a 301 redirect for permanently moved pages, to send users and search engines to the new URL automatically. Use this jumplink to know more: Set-up Redirects
- Update internal links: Fix links within your site that point to the old URL to reflect the new page location. Or you can remove the links to the deleted page.
- Inform search engines: Use tools like Google Search Console to submit updated sitemaps and request URL removals for deleted pages.
- Alternative resource: If a page is no longer relevant, you can replace it with a similar resource. Or even create a custom 404 page with helpful navigation or suggestions.
How to fix an incorrectly formatted URL or 400 Bad Request
An incorrectly formatted URL is a web address (link) containing errors, inconsistencies, or omissions. This makes the link invalid and non-functional. These URLs often fail to direct users to the intended destination, resulting in errors such as ‘Page Not Found’ or “400 Bad Request.”
You can fix these broken links by:
- Double-checking URLs: Do a test after you have added a link to make sure it works as intended.
- Use URL validators: There are tools like the W3C link checker that can check and identify issues for you.
- Follow proper encoding standards: You should replace any special characters with their encoded equivalents. For example, spaces should be coded as: %20
- Standardize URL structure: Make it easy for you and your team by sticking to a set rule. For example, all URLs should be lowercase. Keep to a consistent naming convention.
- Set relative vs. absolute links correctly: For external links, use absolute URLs, for example, https://example.com/page. Use only relative URLs where appropriate. Relative URLs look like this: /page.
How to fix links from a domain name change
What are broken links in a domain name change? When a website domain name is changed, for example, from www.anoldsite.com to www.anewsite.com, it can lead to broken links if proper precautions aren’t taken in. These broken links occur because the link points to the old domain.
Here are some common ways you can fix a broken link:
- Use 301 redirects: You can use a 301 redirect to redirect all traffic from the old domain to the corresponding page on the new domain. For more info on how to set this up, use this jump link: 301 redirects.
- Update internal links: Audit your website and update all the internal links to point to the new domain. If you looking for a link detector tool, use this jump link: Broken link detection tools
- Notify external link owners: Reach out to websites that link to yours to let them know about your new domain change. Ask them to change the link on their site and provide them with all the details.
- Update sitemaps: Submit a new site map to your search engines, such as Google Search Console and Bing Webmaster Tools.
- Update hardcoded links: Remember to check all the links in emails, PDFs, social media profiles, and any other external resources you might have to reflect the new domain.
Set-up redirects
The way you go about setting up redirects depends on the type of server you have. If you’re not sure, go to SEO Book’s Server Header Checker, enter your site’s URL, and look for the “Server:” line. In most cases, you’ll see either “Apache” or “Microsoft IIS.”
If your site uses Apache, you’ll need to set up redirects in your .htaccess file. Simply download the file from your server and enter a line that looks like this:
Redirect 301 /example.html Redirect 301 /example.html http://www.example.com/example2.html
Write the broken URL in place of “/example.html”, and write the redirected URL in place of “example2.html”.
This is the simplest way to set up a redirect. However, if your broken links also contained URL parameters (for banner ads, email campaigns, and other marketing strategies), you’ll need to include those in the redirect as well.
To maintain a full URL with parameters, your redirect will look like this:
RewriteCond %{QUERY_STRING} (.*)
RewriteRule ^oldpages\/example\.html$ http://www.example.com? [R=301,L]
This way, even after your redirect is in effect, you’ll be able to get correct data in your Google Analytics account.
Using Microsoft IIS6 & IIS7?
If your site uses Microsoft IIS6 or IIS7, you’ll need to use on-page redirects. This requires slightly more work, as you’ll have to create pages for each of your broken links’ URLs and place a piece of code in the header.
Going off of the example above, this means that you’d have to create a page with the URL “www.yoursite.com/example.html” and insert the following in the header:
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”http://www.yoursite.com/example2.html”
%>
This way, when the original page is called, the server will read this code and redirect visitors to the appropriate page instead.
Test your redirects
Once you’ve set up your redirects, go back to SEO Book’s Server Header Checker to verify that they’re working properly. Enter the old, previously-broken URL into the tool, and look at the “Server Response.”
If you see “301 Moved Permanently,” you’re all set! A 301 status code means that all visitors and search engine crawlers will be directed to the new page and the link is no longer considered broken.
Do broken links matter?
Yes! Broken links affect the overall quality of your site, which is something search engines like Google look for. It will indicate to them that your site isn’t up-to-date or is poorly maintained, all resulting in a bad experience.
Broken links and SEO
Let’s look at what is a broken link on a website from an SEO perspective. Broken links can harm your website’s SEO by disrupting the user experience and interfering with how search engines crawl and rank your site.
But why?
Backlinks to your website are a factor for SEO as they pass ‘link credibility’ and value to your site. When a link leads to a broken page, this equity is lost, which takes away from your site’s authority in the eyes (or bot) of a search engine.
They encounter broken links while crawling on your site. If the bot hits a dead end while crawling, it can prevent the pot from prioritizing your key pages.
You can use an SEO-friendly tool like Google’s Search Console to flag broken links and crawl errors.
Broken Links and UX
What are broken links within the perspective of a user experience (UX)? A broken link causes navigational uses for users, as they create warriors and hurdles for users to find relevant content. It also creates a negative impression that your site doesn’t work, and therefore neither do your products.
Users will lose trust in your brand and start to question the reliability of your content or services. This will also interrupt their buyer journey and might cause them not to convert. You can spot if this is a cause for concern by looking at your website’s bounce rate. A higher bounce rate indicates that users are living without further interaction.
Finding the opportunity in broken links
Discover how to fix a broken link with a positive outcome! The most effective way to turn a broken link into a positive customer experience is to design a custom 404 page.
When a link is broken, it can cause frustration for your users. But if you can add humor or a solution, it could prevent users from leaving your site and guide them to alternative content to continue their user’s journey.
Simple ways to do this include:
- Give them a form to email you directly about what they are trying to find.
- Use humor to soften the experience.
- Encourage exploration by giving them links to other content.
- Introduce them to other features or resources they might not have known about.
Marvel 404 error example
A great example of this would be Marvel’s 404 Page error page, where they have blamed HYDRA in stealing the page! It adds to the world-building of the comic, plus it brings in a humorous edge to the experience.
Lego 404 error example
If you come across a broken link on the Lego site, they will make you smile with their “oh bricks” message!
Amazon broken link example
Do you know what really puts a smile on people’s faces and makes them automatically forgive you for any hurdles? Puppies. Amazon has created an assortment of 404 error pages, each featuring a gorgeous face of a puppy and a link to their story. This is a great example of a side quest/exploration/distraction for the user!
How WebFX can help you fix broken links
If you’re looking for an agency that can give your site a complete overhaul while retaining all the work you’ve put into your SEO so far, WebFX can help! Our team has years of experience in both web design and Internet marketing, and we know exactly how to avoid broken links during the redesign process.
For more information, contact us today! One of our strategists will be more than happy to discuss your project.
Table of Contents
- What is a Broken Link
- Find Broken Links with a Site Audit
- How to Fix a Broken Link for Deleted or Moved Pages
- How to Fix an Incorrectly Formatted URL or 400 Bad Request
- How to Fix Links from a Domain Name Change
- Do Broken Links Matter?
- Finding the Opportunity in Broken Links
- How WebFX Can Help You Fix Broken Links
Related Resources
- Grunt Vs Gulp: Which Web Developer Automation Tool Should You Use?
- How to Buy a Domain Name in 5 Easy Steps
- How to Develop a Handmade Illustration with Photoshop
- How to Find the Screen Sizes of Popular Devices
- How to Get Your Web Development Projects off to a Good Start
- How to Host a Website when You’re New to Website Hosting
- How to Make a Website Searchable in 14 Steps
- Interactive Websites: Your Birds-Eye-View [Examples, Features, & Tips]
- Learn Web Development
- The 7 Best Programming Languages for Beginners
Marketing Tips for Niche Industries
- How Much Does an Ecommerce Website Cost?
- How to Create a Fantastic Daycare Website Design in 4 Steps
- How to Create a Website That Drives Results for Your Countertop Manufacturing Business
- How to Find the Best Law Firm Web Designer
- How to Master Web Design for Telehealth to Drive Revenue
- HVAC Web Design
- HVAC Website Designs
- Important Website Design Tips for Lawn Care Businesses
- Industrial Website Design Examples
- Pediatric Dental Websites: 5 Tips for Impactful Web Design
Additional Reading
- 9 Benefits of Using Bootstrap for Landing Pages
- ADA Compliance Testing
- Best WordPress Plugins for Business Websites
- Does Your Site Need HTTPS?
- Does Your Site Need an SSL Certificate?
- How to Choose a Domain: Choose a Domain Name That You (& Users) Love
- How to Consolidate Two Websites: Your Website Consolidation Strategy
- How to Host a Website when You’re New to Website Hosting
- How to Make a Website Searchable in 14 Steps
- Interactive Websites: Your Birds-Eye-View [Examples, Features, & Tips]
- Landing Page Speed Test
- Questions to Ask Web Developer
- Shopify vs. WooCommerce
- The Difference Between a Mobile Site and a Responsive Site
- Top 5 Advantages of Magento