remove/update the broken links in Sitecore CMS?

Hello,

As there is huge list of Broken Links (around thousands), Is there any automated way to remove/update the broken links in Sitecore CMS? If I go for "Rebuild Link Database", it is taking some hours which i couldn't do it in Production Server. 

  • In Sitecore exists an admin page that allows removing broken links. You can find it here:

    yourwebsite/.../RemoveBrokenLinks.aspx
    You just select the database and execute the action.

    You may need to change timeout settings in web.config:
    <setting name="DefaultSQLTimeout" value="10:00:00" />
    <setting name="DataProviderTimeout" value="00:00:00" />
    I don't think you have better option for Removing Bronken Links.
    Also what you can do, make a backup for your database on live,tell to editors to not add or update content.
    Bring the database locally and run RemoveBrokenLinks page.
  • You may also try truncating your links database [ check <LinkDatabase /> node in web.config] and then try rebuilding links DB which will be faster comparatively. Make sure you rebuild both master as well as web DBs.

    Hope this helps!

    Muktesh
  • In reply to Sitecore Climber:

    Thank you. Let me give a try on this.

  • In reply to Yeshwanth Thummala:

    I tried performing actions in RemoveBrokenLinks.aspx page but getting the below error.

    I also tried "Rebuild the Link database" and "Clean up the database" from Control Panel but getting the same error. Thanks in Advance!

  • In reply to Yeshwanth Thummala:

    I am also facing same issue with sitecore 7.2, Please suggest how did you do and is it resolved?
  • In reply to Yeshwanth Thummala:

    I tried removing broken links using website/.../RemoveBrokenLinks.aspx but still getting same mentioned error.
    Is this issue resolved ? please share us the fix/ solution for this.

    Thanks.
  • Hi

    An easy way to solve the broken links to navigate through the link Sitecore Instance Name/sitecore/admin/RemoveBrokenLinks.aspx?sc_lang=en

     

    In case opening the url is any error facing then go to control panel and rebuild the link database, generally, it takes few minutes for master, web. 

    Other Wise using the below code also able to get the broken links 

    Sitecore.Links.LinkDatabase linkDb = Sitecore.Globals.LinkDatabase;
    Sitecore.Links.ItemLink[] brokenLinks = linkDb.GetBrokenLinks(db); // db means sitecore Sitecore.Context.Database e.g. master, web etc
  • In reply to DEBAL SAHA:

    I tried all above steps and getting below error while browsing the RemoveBrokenLinks.aspx