X
Closing this message and/or accessing our website tells us you are happy to receive all cookies on the ClearPeople website.
However, if you would like to, you can change your cookies settings at any time.
A broken link is a reference to an item in the Sitecore Content Tree that does not exist anymore. It’s important that your website does not contain any broken links as these discourage search engines to crawl and index your site, and also reduce customer trust in your website.

Unpublished Pages

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.


For example:


Broken Links 1

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. 


Broken Links 2

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
Broken Links 3
 
  • Use the Rebuild Links Database tool

Broken Links 4


  • 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

Content Editor

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:


Broken Links 5

Note that saving an item that contains a broken link in any field will trigger a notification and warn you first.


Broken Links 6

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.

Author bio

Antonio Esteban
Antonio Esteban
.Net Developer
As a passionate .NET developer and technology lover I worked with a vast variety of technologies and currently working as a Sitecore developer for ClearPeople. Apart from coding, I love music with a passion, and always looking for something new to learn.

Comments


comments powered by Disqus

Related Articles

Sign up to our Newsletter

Every now and then, we'd like to send you information that delivers, develops and promotes our products and services that are relevant to you. Submitting your details tells us that you're OK with this and you also agree to our Privacy & Cookies policy. You can, of course, opt out of these communications at any time.