Broken Link Notifier
Basic Set Up (Optional)
The plugin works out of the box just by installing it and visiting pages with broken links on them; however, you might notice a lot of links being flagged as broken that are not actually broken. Therefore, there are some things you can do to manage this from the get-go. Let's start with updating your settings first.
In the admin area of your site, navigate to Broken Link Notifier > Settings.
- Disable notifications: By default, you will be emailed notifications every time someone visits a page with newly found broken links on it. Once a broken link is found, it will be added to your Results page and you won't be notified again of the same broken links unless they are removed from your results before resolving them. It is recommended to disable notifications until you get everything set up, though, as getting bombarded with emails isn't exactly fun.
- Enable the following settings: Allow Redirects, Enable Warnings, Check for Broken Images, Warn if SSL is Not Verified, Scan
<header>
Elements, Scan<footer>
Elements - Enable Multi-Scan for These Post Types: Keep Posts and Pages checked, and select any additional post types that are on your front-end that are used like posts or pages. Some post types are used for other data collecting only and should not be selected.
Navigate to Broken Link Notifier > Multi-Scan. We will begin by looking at all of your pages and posts so we can catch things before your visitors do.
- Click on the button labeled "Scan Pages".
- The page will automatically start scanning the first page of pages in the admin list table, and you can see the results in the right "Broken Links" column.
- If there are any pages that you do not want to scan in the future, you can omit them by hovering over the page title and clicking on the "Omit from Scans" action link.
- If the list table ends abruptly and doesn't continue loading the page, it's because the last page showing is being redirected. You will need to copy the link (right-click on the View action link to copy the link address), and head over to Broken Link Notifier > Omitted Pages to add the link manually.
- You can investigate each link that turns up broken from here, or you can wait until you're done going through all of the pages and then resolve them from the results page (Broken Link Notifier > Results).
- You will need to go to each page of pages to scan them one at a time. This method prevents the site from timing out trying to do your whole site at once.
Navigate to Broken Link Notifier > Results.
- You'll notice that the Verify column on the right automatically rescans the links on the page every time you load the page. This is because it is common for links to be falsely flagged as broken due to a user's connection or firewall, so we want to check again just to be certain. You may notice some of them resolve themselves and get automatically deleted in the process.
- Look for repeated links that all start with the same thing but are coming up flagged. For example, maybe you have links on your event pages for an Add to Calendar button that uses JavaScript to create an
.ics
file for download. It might start withhttps://www.google.com/calendar/render
, and ends with a string of data that is different every time. You can omit these types of links by going to Broken Link Notifier > Omitted Links and adding the link followed by an asterisk (ie.https://www.google.com/calendar/render*
). Similarly, you can omit your category and tag archive pages if they get flagged by adding/category/*
and/tag/*
.
Navigate to your homepage.
- Doing so will scan your homepage, including your header (everything above the main content) and footer (everything below the main content) since we enabled it in settings. You only really need to do that once unless you are adding external links that may change. If you know that your header and footer will be good, you can disable it in settings and improve performance by skipping them in the future.
Now you should be all set up and ready to go. You will likely find yourself omitting links and pages here and there, but you'll get the hang of it.
Settings
In the admin area of your site, navigate to Broken Link Notifier > Settings.
- View Results (button at top): Links to the results page that you can also go to under Broken Link Notifier > Results.
- Pause Front-End Scanning: I know this defeats the purpose of the plugin, but you might want to disable the front-end scanning temporarily while you're editing pages or if there are conflicts that need to be resolved. Just note that if you enable this, you will not get notified of broken links.
- Enable Emailing: Emails are sent any time someone loads a page on the front-end of your site with a new broken link. One email per page load. Once they have been found, they stay on your results page and you don't get further emails about the same links unless you trash them from your results without resolving them. You can turn off email notifications and still get website notifications in your admin bar.
- Emails to Send Notifications: Enter all emails addresses (separated by commas) that should be notified. If you disable emailing, no need to remove the emails as it will just be ignored. This allows you to quickly turn them on and off without having to update the emails each time.
- Enable Discord Notifications: You can also send notifications to a Discord channel if that's your thing. Emails can often get hung up or delayed, and we have found that Discord notifications tend to be more reliable.
- Discord Webhook URL: On your Discord server (you must be the owner or have permission to manage webhooks), go to Server Settings > Integrations > Webhooks. Click on the New Webhook button, scroll down to see a new bot labeled something like "Spidey Bot" or some other generic name that Discord decides to call them this week. Click on the bot and choose a name for your bot, the channel it should appear in, and an image if you want. Then copy the Webhook URL and paste it into this field on your website. Step-by-step instructions are available under Broken Link Notifier > Help.
- Enable Microsoft Teams Notifications: You can also send notifications to a Microsoft Teams channel.
- Microsoft Teams Webhook URL: On your Microsoft Teams app, you'll need to add a new app called "Incoming Webhook". Add to a team, choose a channel, and set up the connector. Name your webhook and add an image if you like. Click Create, copy the webhook URL and paste it into this field on your website. Step-by-step instructions are available under Broken Link Notifier > Help.
- User Agent: For each link the plugin finds, it has to communicate with the webpage, file, or image that the link points to in order to see if it's valid. It tells the site where the request is coming from, which is the User Agent. By default this is
WordPress/{blog_version}; {blog_url}
, whereas the blog version is the version of your WordPress installation, and the blog url being your website's homepage. Website servers can choose to accept or deny requests from certain websites, so if they don't like requests from WordPress, they can simply return a bad request code back, which will flag the link as broken. On the other hand, if the user agent is unknown to them, they might also reject it. You can change this, but please do not lie about where it's coming from. - Timeout (seconds): This is how long you want the plugin to wait for a response when trying to connect to a link's server before quitting. By default, this is 5 seconds which is plenty of time to get a normal response. If you are seeing a lot of warnings about links timing out, you may want to increase this while you investigate further.
- Max Redirects: The maximum number of redirects before giving up on a link. Here's how it works. When you click on a link that is supposed to go to https://example.com but you end up at https://example-2.com, that means the site redirected you to another site. Probably because the old link has changed and they saved you the hassle of clicking on another link without losing the traffic that still has the old link. This is a single redirect and is pretty common. Sometimes pages will redirect you more than once, more often when loading images that have moved or are using simplified or short URLs. By default the plugin will only allow 5 redirects before saying enough is enough. Note that you will get the original redirect status code if you set the max redirects to 0, which is often a
301
or302
code. If you set it to the final redirect count or higher, you will get the final status code of the landing page, usually a200
if good or404
if not found. Anything in between will return a code0
for "too many redirects" for the request. This will only work if you allow redirects in the option below. - Allow Redirects: By default, the plugin only checks the hidden headers of the pages it is checking. This is fast and efficient. However, it does not check for redirects, so you might get some redirected links coming back with incorrect status codes. If the landing page is good, then they won't be flagged, and if it's bad, then it will be flagged. You can enable this option to instead make requests that get the entire content body of the links, which will improve accuracy of the status codes you receive, but at a small cost of performance on your website. It should not make a significant impact, but it's something to be aware of. One other issue is that larger documents might cause issues since this method downloads files to check their validity, and if they are too big it will hang up. We recommend leaving this disabled normally, and maybe occasionally checking doing a multi-scan with it enabled to see if anything needs to be updated.
- Force Documents to Use
HEAD
Requests: If you have enabled allowing redirects (above), by default images, videos, and audio files force the use ofHEAD
requests rather thanGET
. Some servers automatically blockHEAD
requests for documents, so we don't force them by default. If you are having issues with large documents not completing a scan, then you can try enabling this option to see if it helps. If they are blocked, at least you will know why. - Enable Warnings: By default, this only includes status code
0
, which is when the plugin gets no response from the server the link points to. This doesn't necessarily mean that it's a broken link. - Enable Delete Source Action Link: An action link will appear on the Results tab under the source where you can delete the post or page entirely.
- Check for Broken Images: Includes image
src
links in all scans. - Warn if SSL is Not Verified: If you are not concerned about insecure links, you can disable this, but it is recommended to leave it enabled.
- Scan
<header>
Elements: Only applies to page load scans - the header elements usually include the navigation menu(s) at the top of the page and everything else above the main content. This section should show on most (if not all) of your pages at the top. If you know that your header is good, it is recommended to leave this disabled to improve performance. - Scan
<footer>
Elements: Only applies to page load scans - the footer elements usually include links and copyright information at bottom of the page and everything else below the main content. This section should show on most (if not all) of your pages at the bottom. If you know that your footer is good, it is recommended to leave this disabled to improve performance. - Show Results in Dev Console: Only applies to page load scans - if enabled, you can see the results on the front-end of the site as you load the page by opening up the developer console in your browser.
- Enable Multi-Scan for These Post Types: These are the post types that the plugin will scan automatically on page load. Pages and Posts are your default public-facing post types. Some plugins and themes will use custom post types that are different from posts and pages in order to stay organized and so they can have more flexibility in dealing with data. You can enable scans on other post types, as long as they are acting like pages or posts where users will be visiting. Other post types that are simply there for organizing data should not be scanned.
- Status Codes: This shows the current status codes that are marked as broken or a warning. If you click on the "View/Change Status Types" link, you can expand all of the status codes available and change the types (Good, Warning, or Broken) for each individual one. For instance, if you want to get warned about redirects, you can do so by changing the
301
and302
codes to Warning.
Results
Navigate to Broken Link Notifier > Results.
This is where all of your flagged links can be found.
- Type: Includes "Broken" or "Warning" status, the status code, and the status message. "Good" links will not appear here.
- Link: The link that is flagged. Hovering over it gives you options to Clear the result, or Omit it from future scans, or Replace it directly from this page. Replacing the link will automatically mark the result as good and clear it from your results page so it won't show up again.
- Source: The page the link was found on. Hovering over it gives you options to view the link on the page, omit the page entirely from future scans, run a single page scan, or edit the page so you can resolve it. It's helpful to view the page to find the link and then edit it to fix it. Additionally, if you have selected "Enable Delete Source Action Link" in Settings, a Trash Page link will appear here as well.
- Source Post Type: The post type, such as Page or Post, or another custom post type.
- Date: The date and time that the link was first discovered.
- User: The user that found the link if they are logged in. Otherwise it will say "Guest".
- Verify: When you load the page with links on there, you will see in the far-right "Verify" column that the plugin automatically rescans all links one by one on the page to confirm that it's still broken or a warning. This is because sometimes links can be false positives simply because the external website was down briefly or slow to respond, among other issues. So often you'll find yourself just coming to the results page to have them sort themselves out without you having to do anything. 🙂
Omitted Links
Navigate to Broken Link Notifier > Omitted Links.
Here you can omit links from all future scans. By omitting them, they will not be checked for validity and you will not be notified if it is broken. This is useful if you have links that you are giving you problems but you know are valid.
You can omit full links or partial links with wildcards. For instance, if you want to omit all links from a certain domain, you can include the domain followed by an asterisk: https://example.com/*
.
When adding an omitted link, you can add an optional note for your own records. That way you and your teammates know why it was omitted down the road.
Omitted Pages
Navigate to Broken Link Notifier > Omitted Pages.
Here you can omit entire pages from all future scans. By omitting them, none of the links on the page will be checked for validity and you will not be notified if they are broken. This is useful if you have pages that do not have links or if they have dynamic content. There is no purpose in scanning them, so you might as well save the resources. Also, you'll need to omit any pages that you are redirecting as they can cause issues with the Multi-Scan.
You can omit full page paths or partial paths with wildcards. For instance, if you want to omit all pages that are children of a specific parent page, you can include the parent page followed by an asterisk: https://yoursite.com/parent-page/*
.
When adding an omitted page, you can add an optional note for your own records. That way you and your teammates know why it was omitted down the road.
Page Scan
Navigate to Broken Link Notifier > Page Scan.
This allows you to check all of the links on a specific page from your site. It will not check links on an external website. It is useful to verify if links are actually being found or if they are reported as "Good" when they are not reported to your Results as a warning or broken. Links that are dynamic or hidden behind conditional logic will not get scanned.
Just enter the URL or Post ID of the page you want to scan and click "Scan Now". You can also get here from the Results page under the source column.
- View (button on top right of the table): Takes you to view the page that you are scanning. If there are any broken links not inside hidden elements, they will all glow yellow with a red dashed line around them so it's easy to spot them.
- Edit (button on top right of the table): Takes you to the edit screen of the page you are scanning so that you can resolve any issues.
- Link: Includes the link found.
- Title: If it's a link to another page on your website, this will show the page title.
- Status: "Good", "Warning", or "Broken"
- Code: The status code that is returned by the link's server when a request is made.
- Message: A brief description of what the code means.
- Speed: Shows how long it took to check the link. This is useful to see if the link is timing out.
- Actions: "Omit" allows you to omit the link from all future scans (not just on the page scan). "Find" allows you to view the page on the front-end of your site so you can see where the broken link is. If it's not inside a hidden element, the link will glow yellow with a red dashed line around it so it's easy to spot.
Multi-Scan
Navigate to Broken Link Notifier > Multi-Scan.
Our Multi-Scan is different than most plugins. It doesn't just scan the whole website and give you results like you would expect. The reason we don't do that is because most hosts do not allow for such a big load all at once. It causes a slew of issues and often times out. Generally speaking, doing a full scan like that is better to be done off-site. Here are a few links to consider:
The way we do it is by loading your WP List Tables for individual post types, checking one set of pages at a time. We also ignore the header and footer during the process since it's unlikely to be an issue. The scan runs on AJAX in the background, too, so you can see the results as they happen.
To begin, choose one of the post types that has at least one post or page from the buttons. This will go to your published posts or pages, not all of them. If you have any Private pages, you might want to click on the Private link at the top of the page and scan those as well. You can also navigate to your post types without going to the Multi-Scan page first, and click on the "Scan for Broken Links" button at the top of the page. This button will only appear on the post types you have selected in your Settings.
To stop scanning, click on the "Stop Scanning" button at the top.
During the scan you can see a new column called "Broken Links" that starts scanning each page that is not omitted.
- If it is omitted, it will say so.
- If there is no content, it will say so.
- If there are links, it will show that it is scanning and how many links in the process. It will also show...
- the total number of links found,
- how many are broken,
- how many warnings there are,
- how many errors that occurred if any, and
- how long it took to scan.
- If any broken links, warning links, or errors are found, they will be listed individually under the scanning results. It will include...
- the link
- the type (Good, Warning, or Broken)
- the status code and message
- action links: Omit" allows you to omit the link from all future scans (not just on the multi-scan). "Find On Page" allows you to view the page on the front-end of your site so you can see where the broken link is. If it's not inside a hidden element, the link will glow yellow with a red dashed line around it so it's easy to spot.
If you hover over the post/page title, you will see two action links:
- Scan for Broken Links: Takes you to the Page Scan and starts scanning that page.
- Omit from Scans: Skips scanning this page in all future scans (not just on the multi-scan).
If you have more pages that are on the screen, click on the ">" button at the top or bottom right of the table to scan the next set of pages. If you want to scan more pages at once, you can change the number of items per page in the Screen Options at the top right of the screen.
Link Search
Navigate to Broken Link Notifier > Link Search.
This page allows you to search your entire site for a specific link, giving you a list of pages it is on. That way you can go and replace them if needed. It does not give you ability to replace links across your site in one go; our plugin does not modify your database at all. If you are interested in such a feature, we recommend using Go Live Update Urls by OnPoint Plugins.
- Post/Page Title: Shows you the title of the post or page the link is found on
- Status: Shows you the status of the post or page (Published, Draft, etc.)
- Post Type: Shows you the Post Type (Post, Page, or Custom Post Types)
- Actions: "Show Me" allows you to view the page on the front-end of your site so you can see where the broken link is. If it's not inside a hidden element, the link will glow yellow with a red dashed line around it so it's easy to spot.
Help
Navigate to Broken Link Notifier > Help.
The plugin also includes its own help section so that you don't have to return here for most things.