Insights

Relocating Links To Another Item In Sitecore

Introduction

There are a number of instances where you may need to relocate links from one item to another in Sitecore as a content author.

For me, I recently needed to delete an old landing and had to make sure that all of the items that linked to that landing page and its sub-items would now link to the new page that I created.

If there were only a few items linking to this old landing page, it wouldn’t be too tedious to click on each item and relink them to the new page.

This was not the case for me. There were nearly 100 items linked to this landing page and I needed a quick solution.

This blog will show you how to relocate links when deleting an item/page to prevent broken links on your site.

See Where An Item Is Being Used

To see what other items (if any) link to the item you are wanting to delete, check out our other blog to Find Out Where An Item Is Being Used.

Relocating Links To Another Item

1. You’ll want to locate and right-click the item to be deleted in the content tree. Select ‘Delete’ from the menu.

Right click an item to delete it in Sitecore

2. A message modal will appear asking if you are sure you want to delete the item, as well as a warning that the sub-items on the item you’re about to delete, will also be deleted. Click ‘OK’.

Confirm deletion of an item in Sitecore

3. The following window will let you know that other items contain links to this item or sub-items. You can choose from one of three options:

Breaking Links in Sitecore when deleting an item in the Content Tree

Remove Links:

This will remove the links to this item from the other items that link to it.

Link To Another Item:

This is the option to select to relocate the links to another item/page in the content tree.

Leave Links:

This will cause broken links on your site and appear in the Broken Links report (this option is not recommended).

4. If you would like to view what other items link to the item you are going to delete, click the ‘Edit Links’ button.

Here you can see which links you want to edit, remove, or link to another item. If you only have a few links to relocate or only want to relocate some of the links that point to this item, you can do so in this window.

Edit, remove, or link to another item when viewing the links to an item in Sitecore

Select ‘Close’ when you are finished.

5. If you find yourself in an instance like mine where you needed to relocate all the links that pointed to the item, go back to the Breaking Links window, select ‘Link to another item’, and then click ‘Continue’.

6. Select where you want to relocate the links to (the new landing page in my case). Click ‘Continue’.

Select a new item to relocate links to in the Sitecore content tree

7. You will see that the old landing page is no longer in the content tree and the links now point to the new landing page. You can check to confirm that the links have been relocated correctly by watching the tutorial video below.

Wrap Up

It’s best practice to avoid broken links on your website, so be sure to always double-check before deleting items.

‘Linking to another item’ will ensure that the existing links transfer from one item to another and avoid broken links.

If you have any questions or would like to know more about Sitecore for content authors, check out our Facebook group or connect with me on Twitter!

We'll be cool about it. Promise.

Stop wasting your time and money.

Switch to an exclusive, Canadian Sitecore partner trusted by the world's best brands.

Meet Kayla Forgett

Digital Marketer

🐱☕️🏔

Kayla is a Sitecore Digital Marketing Optimization Certified Digital Marketer who focuses on everything from SEO to content strategy to social media to create impactful user experiences and brand growth. She's worked coast to coast in Canada in industries from NATO defense technology to collaborating with A-list celebrities and influencers for brand campaigns. She's a self-described 'marketing chameleon' that's able to take on any project. Kayla's a big fan of her two cats and strong cups of coffee. You can find her on the ski hill in one of her many retro ski jackets in the winter and travelling abroad in the summer months.

Connect with Kayla