How to Avoid Broken Links (and How to Fix Them) on Your WordPress Pages and Posts
As an expert in nonprofit marketing and development, you know the importance of keeping your website's content fresh and accessible. As part of that continuing work, there are a lot of good reasons to update your page titles or URLs. Whether you're updating old posts, reorganizing your site, or making your page links more user-friendly, it's crucial to manage changes to avoid broken links.
Let's talk about why you might change the URL (aka slug or permalink) and the best practices to avoid broken links that frustrate visitors and negatively impact your search engine rankings.
Why You Might Need to Change a URL
Before we talk about solutions, let's review why you might need to change a URL:
- User-Friendly Links: Simplifying a URL makes it easier to share and remember.
- Content Updates: Updating old posts with new information might necessitate a URL change to reflect the current content.
- Site Reorganization: As your nonprofit grows, you might need to restructure your site for better navigation.
- Deleting or Unpublishing Old Content: Sometimes, outdated or irrelevant content needs to be removed or unpublished.
In all cases, managing the resulting broken links is essential to maintain a good user experience and SEO.
Why Broken Links are Bad
Changing URLs can have several implications:
- Loss of Page Rank: Changing a URL can lead to a loss of SEO benefits if not managed correctly.
- Broken Links: If links aren't updated, users and search engines will encounter broken links, leading to a poor experience and decreased SEO value.
- Indexing Issues: Search engines need to reindex new URLs, which can take time.
- User Frustration: Broken links lead to “404 Not Found” errors, frustrating visitors.
The good news is that you can avoid these problems with a plan and some simple steps.
Avoiding Broken Links
Plan Ahead
Before changing URLs, list all the pages and posts you plan to update. Use a simple spreadsheet with columns for:
- Old Page Title
- New Page Title
- Old Page URL
- New Page URL
This helps you update links efficiently and reduces the chances of missing any crucial links.
Set Up Redirects
Setting up redirects ensures users and search engines can still find your content after changing a URL. A 301 redirect tells search engines the page has permanently moved, preserving your SEO rankings.
Using the Redirection Plugin
The Redirection plugin makes it easy to manage redirects in WordPress. Here’s an example of how you would set up a redirect:
- Go to Tools > Redirection in your WordPress dashboard.
- Add a New Redirect:
- In the Source URL field, enter the old URL (e.g.,
/donate-now
). - In the Target URL field, enter the new URL (e.g.,
/support-us
).
- In the Source URL field, enter the old URL (e.g.,
- Set the Match and Action:
- Ensure the Match dropdown is set to URL only.
- The Action should be set to Redirect to URL.
- Add the Redirect by clicking the Add Redirect button.
By doing this, anyone who visits the old URL /donate-now
will be seamlessly redirected to /support-us
.
Test Your Redirect
After setting up a redirect, test it to ensure it's working:
- Open a New Browser Tab: Use a different browser or an incognito window.
- Enter the Old URL: Type the old URL into the address bar and press Enter.
- Check the Result: Verify you're redirected to the new URL without errors.
- Use a Redirect Checker Tool: Tools like Redirect Checker or HTTP Status Code Checker can confirm your redirect is a 301 (permanent) redirect.
Testing your redirects ensures that your users will be smoothly redirected to the correct page.
Update Internal Links
Update all internal links on your site to point to the new URL. This includes links within blog posts, menus, and other navigational elements. Keeping internal links updated avoids unnecessary redirects and ensures a smooth user experience.
If there are more than 2-3 changes to make, ask your web team for help. There are ways to do sitewide searches when needed. This should be done with extreme caution because it's very easy to make a mistake and cause every link on your site to be broken if not done correctly.
Submit New Sitemap to Google (if needed)
If you have a lot of changes to URLs or your site structure, we suggest you also create and submit a new sitemap to Google. A sitemap helps search engines understand the structure of your website and index your pages correctly.
To create a new sitemap, you can use plugins like Yoast SEO, SEOpress, or Google XML Sitemaps. Once your sitemap is updated, submit it to Google Search Console by navigating to the “Sitemaps” section under “Index” and entering the URL of your new sitemap. This ensure that Google is aware of your updates and can reindex your site efficiently.
What If You Already Have Broken Links?
Regularly scan your site for broken links using tools like:
- Broken Link Checker Plugin: Scans your site for broken links and missing images.
- Online Tools: Services like Ahrefs, Screaming Frog, and Google Search Console provide comprehensive reports on link issues.
- Manual Checking: Regularly review your content and test links manually.
If you discover broken links:
- Identify the Broken Links: Use a broken link checker tool.
- Implement Redirects: Set up a 301 redirect for each broken link.
- Update Links: Update any internal links to point directly to the new URL.
- Notify External Sites: Request external sites to update their links to the new URL.
When changing URLs, it's important to consider where your old links might be published. Here are a few common places:
- Social Media: Posts and shares on platforms like Facebook, Twitter, and LinkedIn.
- Email Campaigns: Newsletters and promotional emails that include links to your site.
- External Websites: Other websites or blogs that have linked to your content.
- Printed Materials: Flyers, brochures, or business cards that contain your website URL.
- Internal Documentation: Internal links within your own website, such as blog posts, resource pages, and navigational menus.
By identifying these locations, you can ensure that you update or communicate changes to minimize the impact on users and maintain your site's SEO value.
Recommended Resources
Understanding Redirects
- Moz – Comprehensive guide on the various types of redirects and their uses.
- Semrush – Understanding 301 and 302 Redirects.
- HubSpot – Guide on website redirects and their impact on SEO and user experience.
Testing Redirects
- Redirect Checker – Confirm if your redirect is a 301 (permanent) redirect.
- HTTP Status Code Checker – Check the HTTP status codes of your redirects.
Scanning for Broken Links
- Ahrefs – Identify broken links on your site and provide comprehensive reports on link issues.
- Screaming Frog – SEO spider tool for crawling websites and identifying broken links, redirects, and other SEO issues.
- W3C Link Checker – Check links and identify broken links on your site.
Monitoring and Analyzing Impact
- Google Search Console – Monitor and maintain your site's presence in Google Search results.
- Google Analytics – Analyze traffic and monitor the impact of redirects and broken links.
- Pingdom – Monitor your site's uptime and performance, including the impact of redirects and broken links.
WordPress Plugins
- Redirection plugin (free) – Manage 301 redirects and keep track of 404 errors in WordPress.
- Broken Link Checker plugin (free) – Scan your site for broken links and missing images.
- SEOPress (free and premium) – SEO plugin for WordPress that includes a redirects manager and other SEO tools.
- Yoast SEO (free and premium) – Comprehensive SEO plugin for WordPress with a redirects manager.
Conclusion
Changing URLs is a common task for maintaining and improving your nonprofit's website. By planning ahead, using redirects, updating internal links, and regularly checking for broken links, you can ensure a seamless experience for your visitors, your organization, and also maintain your site's search engine rankings.
Need help planning your content updates, improving your WordPress website, and avoiding broken links? Contact us to learn how our expert services can keep your site running smoothly and supporting your mission.