Managing URL Redirections

Follow

Easily manage and test your redirects across your site without requiring a developer. URL Redirections in Agility CMS provides a way for you to redirect a user from one URL to another URL.

mceclip0.png

What is in this Article

  Note

Your website must pull redirections from Agility CMS and have logic to perform a redirect. Depending on your website framework (if you are using the ASP.NET Sync integration this will work out-of-the-box), the steps may vary. Speak to your website developer about this if you are having issues with your redirects.

Why Use a Redirect?

Implementing redirects on a website is essential to managing your sitemap and preventing dead links. 

Some common use cases include:

  • You've changed the URL of a page and want to ensure any existing links are redirected to the new link
  • You want to provide a shorter (vanity) URL for a longer URL
  • You are migrating from an old site to a new one and you want to re-map your URLs
  • You want to avoid 404 errors
  • You want to temporarily redirect users to another page 

How to Create a Redirect

Creating redirects in Agility CMS is quick and easy.

  1. Login to your Agility CMS instance

  2. Navigate to Settings > URL Redirections

    mceclip1.png

  3. Click the New button to create a new redirect

    mceclip4.png

  4. Enter a value for Origin URL - this represents the URL that you want to redirect to another location.

    The Origin URL can be a relative or absolute URL. For example, http://www.mysite.com/mobile represents an absolute URL, and only full URLs (including that domain) will be matched, while ~/mobile (or /mobile) represents a relative URL and it will be matched to any URL that has that path, regardless of domain.

  5. Enter a value for Destination URL - This represents the URL that you want to redirect the user to.

    The Destination URL can be a relative or absolute URL, just like the origin. If you specify a relative path, the domain portion of the URL will remain the same.

  6. Select the HTTP Code - This represents what type of redirect you want to perform.

    301 - Permanent - Recommended. Instructs users and search engines that this redirect is permanent and there's never a reason to have to retry the Origin URL again. These are heavily cached by browsers.

    302 - Temporary - Useful when you know that your Origin URL will only redirect temporarily. Instructs users and search engines that this redirect is only temporary and that if the Origin URL is requested again, it should attempt a retry. These are not typically cached by browsers.  

  7. Click Save to create the redirect.

Example Redirects

Basic Redirect

  • Origin URL:
    ~/page-a
  • Destination URL:
    ~/page-b
  • HTTP Code: 301

This will redirect ALL users on ANY domain from ~/page-a to ~/page-b using a permanent redirect. This is the recommended practice of handling cases where a page's name has changed.

 Wildcard Redirect

  • Origin URL:
    http://www.mysite.com*
  • Destination URL:
    http://mysite.com*
  • HTTP Code: 301

In this example, we are using a wildcard redirect to redirect all traffic from the
www.mysite.com domain to the mysite.com domain. For example, a request to
http://www.mysite.com/contact-us will be redirected to http://mysite.com/contact-us

How to Test URL Redirections

Agility CMS makes it easy to test all of your URL redirections so you can identify when they aren't working and take action to fix them or remove them.

Learn how to test your URL Redirections

How to Delete URL Redirections

You can delete one or many URL redirections by selecting them from the grid and clicking Delete.

mceclip2.png

How to Import URL Redirections

You can import URL redirections by formatting an Excel file (.xlsx) file with the following columns:

  • OriginURL
  • OriginLangCodes (optional, semi-colon separated)
  • DestinationURL
  • DestinationLangCode (optional)
  • HTTPCode (301 or 302)

You can Export your items and then modify the excel sheet, or download this sample file to get started.

1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.