Aliases for Archived Content Not Removed

  • Updated

What happens to url aliases associated with a content item when it is archived?

When archiving a content item, aliases are retained. This is by design as archiving a content item keeps the content item in the system. If the content item is deleted the aliases will be deleted.

A possible workaround for this issue if you need to prevent the aliases from working is to use a content strategy. In the strategy you can detect the event that is firing off for the content archiving and delete or disable the aliases

    public override void OnAfterContentArchive(ContentData contentData, CmsEventArgs eventArgs)
    {
        base.OnAfterContentArchive(contentData, eventArgs);
    }