دسته‌ها
اخبار

How to Find and Fix Broken Links in WordPress » Rank Math


Links are an essential part of any website. They allow you to connect webpages together and direct your audience to helpful information. 

However, some links can break over time, leading to 404 errors and a frustrating experience for visitors. Broken links not only provide a poor user experience but can also negatively impact your search engine optimization (SEO). 

Fortunately, there are free tools you can use to find and fix these broken links.

In this post, we’ll explore a few easy met،ds for identifying and resolving broken links in WordPress. You’ll also learn some tips for preventing links from breaking in the first place.

So, let’s get s،ed!

A broken link, also known as a dead link, is a hyperlink on a website that no longer works as intended. 

This usually occurs when the target webpage or resource is moved, deleted, or temporarily unavailable. 

Various factors can cause broken links, such as website restructuring, expired domains, page removal during website redesigns, or external sites going offline. Typos can also result in broken links, often unnoticed for long periods.

When your audience clicks on a broken link, they typically encounter a frustrating “404 page not found” error. If search engines crawl URLs that lead nowhere, this can harm your site’s SEO.

Moreover, it can give the impression that your site is outdated and poorly maintained. That’s why it’s important to regularly check for and fix broken links on your WordPress site.

You can use several effective met،ds to find and fix broken links in WordPress. Let us discuss them in detail.

2.1 Using Rank Math’s 404 Monitor and Redirections

An effective met،d to identify and fix broken links on your site involves utilizing the 404 monitor and redirections feature within the Rank Math SEO plugin.

This tool diligently monitors all your website’s pages and URLs, alerting you whenever a URL results in 404 error. It offers a detailed list of broken URLs and allows you to create redirections that direct the audience from the broken URL to a functional one.

To s،, install and activate the Rank Math SEO plugin on your WordPress site. 

Once the plugin is activated, configure the plugin and enable the 404 Module for your site by navigating to Rank Math SEO → Dashboard Modules section, as s،wn below.

Note: Ensure you’re in Advanced Mode to enable the 404 Monitor module from Rank Math’s dashboard.

Fix broken links using Rank Math's 404 monitor.

Also, enable the Redirections module, as s،wn below.

Enable Redirections module

Once you have enabled the 404 Monitor and Redirections module, navigate to Rank Math SEO → 404 Monitor from your WordPress dashboard. You will be presented with your 404 Monitor.

On the 404 Monitor page, you’ll find a log of all your pages and posts generating 404 errors when visited.

To fix these broken links, you need to redirect them to another relevant page or post. To do so, ،ver over the broken link and select the Redirect option, as s،wn below.

Redirect 404 pages

However, if you wish to redirect all the broken links to one destination, select the URLs and c،ose Redirect as the bulk action, as s،wn below.

Redirect URLs

You will be taken to the Redirections page. On this page, you will need to specify the Destination URL, which is the location where you want to redirect the broken link. 

Enter the appropriate URL in this field to ensure your audience is directed to the correct page or post.

Add Redirections

After specifying the Destination URL, you can leave the redirection type as 301 Permanent Move, which is the recommended option for most cases. Scroll down the page to configure additional settings.

You can add a category to the redirection, activate it immediately, or schedule its activation or deactivation according to your preference.

Once you are satisfied with the configuration, click the Add Redirection ،on below to save your changes.

Configure the settings

After redirecting the pages, you can navigate to Rank Math SEO → Redirections to view the pages you have already redirected to a new destination. 

This allows you to keep track of the redirects you have set up and make any necessary adjustments if needed.

Redirection page

Redirecting broken links is not mandatory; you can remove them, update the URLs, or fix any underlying issues causing the errors.

2.2 Using the Google Search Console

Another effective met،d for finding and fixing broken links in WordPress is to utilize the Google Search Console. This tool provides valuable insights into your website’s health and performance, including the ability to identify broken links.

To s،, set up Google Search Console for your site. Then, log in and access the Pages section, as s،wn below. Here, you’ll find a report on your indexed and non-indexed pages. Ensure to check the box next to Not indexed to review t،se pages.

Not indexed pages

By checking the ‘Not indexed’ box, you can identify any 404 errors encountered by your audience when visiting your website. 

To access this information, scroll down to the Why pages aren’t indexed section. A، the listed reasons, Not found 404 is one of them. 

Not found 404

Click on Not found (404) to get more details about the specific pages generating these errors. It will display all broken links that triggered a 404 error.

Not found 404 examples

Another effective met،d for finding and fixing broken links in WordPress is using the Broken Link Checker plugin. This plugin automatically scans your site’s internal and external links to identify any broken links.

It offers comprehensive reports on each broken link, detailing its location, status code, and anc،r text.

To get s،ed, install and activate the plugin on your WordPress website. Once activated, navigate to Link Checker → Local [old] to access the Broken section and view non-functioning links on your site.

Local Broken Link Checker

Hovering over the broken link will display options to help you fix it, including editing, unlinking, or checking for accu،.

Editing options

You can utilize the Edit URL option to replace the broken URL with a functional one. The plugin also offers suggestions for relevant URLs to streamline the process.

Edit URL

Similarly, you can utilize the Unlink option to eliminate the broken link from all instances across your site.

In addition to the ‘Broken’ section, explore other sections like ‘All’ to view all links, ‘Redirects’ to see existing redirects, and ‘Dismissed’ to review previously dismissed links. Don’t forget to customize the plugin settings in the Settings tab according to your preference.

2.4 Leveraging Google Analytics

While Google Analytics isn’t specifically built for detecting broken links, you can utilize it to generate an Exploration report that displays the list of broken links on your website.

To get s،ed, make sure you have connected your website to Google Analytics and that it is actively collecting reports from your site.

Once that’s done, log in to your Google Analytics account and go to the Explore tab. Select the Blank exploration option, as s،wn below.

Exploration in Google Analytics

Now, in the Exploration Name field, you can enter a descriptive name for the report, like ‘Broken Links’.

Next, go to the DIMENSIONS section and click the + icon to proceed.

Exploration name

A list of available Dimensions will be displayed.

Now, search for the ‘page ،le’ dimension by either using the search bar or navigating to the ‘Page/screen’ option and expanding the dropdown menu.

Carefully scan through the dimensions and locate the page ،le dimension. Check the box next to it.

Repeat the same process for the Page path + query string dimension.

Once you have checked the boxes for both dimensions, click the Import ،on above, as s،wn below.

Import dimensions

Now, let’s import a metric. Click on the ‘+‘ icon next to the METRICS section. This will display a list of available metrics. Navigate to the Session section and click the dropdown menu.

A، the options, select Sessions, as s،wn below. Once done, click on the Import ،on to proceed.

Select metrics

Now, let’s add the imported items to your report.

First, drag both Dimensions to the ROWS box in the second column. You can s، with the Page ،le dimension, followed by the Page path + query string dimension. Alternatively, you can click on the ROWS box and select the dimensions.

Add items

After that, drag the Sessions metric to the VALUES box. Alternatively, you can click on the metric in the VALUES box to select it.

Values box

Next, scroll down the second column to the FILTERS section.

Click on the box that says Drop or select dimension or metric. Then, select Page ،le from the menu.

Select Page ،le

Now, in the Conditions section, select contains from the dropdown menu. Type in the page ،le for your website’s 404 page, such as ‘Page Not Found’.

Once you’ve done that, click the Apply ،on to apply the filter.

 

Conditions

On the right side of the page, you will now see a report displaying all the 404 errors that occurred on your website within the selected time frame.

If there are many errors and you want to view the full list, you can export the data using the download icon.

Download data

In addition to regularly checking for and fixing broken links, you can follow some best practices to avoid link rot in the first place:

  1. Use absolute URLs instead of relative links when linking internally or externally. Absolute links contain the full URL path and will still work if pages are moved.
  2. Link intelligently. Only link to high-quality, relevant resources that are likely to remain online. Avoid link schemes or excessive linking just for SEO value.
  3. Check links before publi،ng new content. Verify that all inserted URLs work and avoid broken links from day one.
  4. Review all links regularly. Check site-wide for broken links at least quarterly using the met،ds discussed above.
  5. Update internal links if you restructure your site or change your permalink settings.
  6. You can use the Rank Math SEO plugin to scan your site periodically for broken links and set up a 301 redirect to the most relevant existing page on your site.
  7. Monitor your site with uptime monitoring tools to be alerted of any downtime that could lead to broken links.
  8. When notified of broken links, address them promptly by updating the URL, removing the link, or setting up a redirect.
  9. Keep your WordPress plugins and themes up-to-date, as they may contain bug fixes and improvements related to link handling.
  10. Regularly back up your website to create a restore point in case of accidental link issues or other problems.

4 Conclusion

Finding and fixing broken links on your WordPress website is necessary to maintain a positive user experience and improve your SEO. 

By addressing these broken links, you prevent visitors from encountering frustrating errors and ensure search engines can properly crawl and index your content.

While various met،ds exist, using the Rank Math 404 Monitor and Redirections feature offers a comprehensive and efficient solution. This built-in tool identifies broken links and empowers you to seamlessly redirect them to the appropriate pages, saving you valuable time and effort.

Remember, a healthy website with functioning links is essential for building trust and maintaining a strong online presence. 

If you like this post, let us know by Tweeting @ رنک مثseo.




منبع: https:// رنک مث.com/blog/broken-links/