Links to items that are not published yet. This is one of the most common causes of broken links. To avoid this, simply browse to the URL when linking pages. To do this, add the domain of your current website followed by the Sitecore page path from your root folder.
The result will be: www.example.com/Contact Us
Unpublished media elements
This usually occurs when a page is published without publishing its new media dependencies.
If you are a content editor that submits pages to the workflow, you must communicate the publishing department about every new media element used by the pages. If the page gets published, Sitecore does not automatically publish dependent media files along with the page.
If you are a content publisher, you must remember to publish every new media item as it’s a dependency before publishing a page. Forgetting to do this will result in a lot of broken links to documents and missing images.
Bad use of Link fields
In order to prevent issues, avoid writing the URL manually into the Link field.
Best practice dictates that you use the available functions above the text box.
Click on Insert Link for internal Sitecore Pages, Insert Media Link for media assets on the Media Library, or Insert External Link for external pages.
Fixing Broken Links
Report and databases
These steps can be followed to fix the broken links inside our application:
- Run the Broken Links Report to locate broken links on Sitecore
- Use the Rebuild Links Database tool
- Run the report again to verify the system was able to repair or remove the broken links
Click an item in the report to view it in the Content Editor and then fix it entering a valid item reference for the field
The content editor can be set to warn about any possible broken link on the tree by simply right-clicking on the left bar and selecting Broken Links:
Note that saving an item that contains a broken link in any field will trigger a notification and warn you first.
And that’s that! Hopefully this guide will allow you to review your site and effectively get rid of any pesky broken links detracting from your otherwise beautiful Sitecore website. If you have any questions do get in touch and we’ll be happy to help you optimise your website further.