Skip to main content
Skip table of contents

Create a vanity URL

What’s this page about?

If you’re a content manager, this guide will help you create a vanity URL using Contentful.

To create a vanity URL without the England or Scotland prefix, you can use the Vanity URL component in Contentful.

Only vanity URLs published in the England Contentful space will be created and become live. Any entries published in the Scotland space will not be output as part of the site build.

For anyone connected to the internal Shelter network, (anyone in the office on the virtual private network) they may need to add www. to the beginning of their published vanity URL to view it eg. www.shelter.org.uk/penny This will not be an issue for external users.

Using the Vanity URL component

1️⃣ Use Add entry to create a new Vanity URL component

2️⃣ In the Path field, add the path for your desired vanity URL

  • If you want to create a vanity URL like shelter.org.uk/penny you would add /penny here.

  • You must use lowercase letters when setting the vanity URL. However, the system is set up so that if a team wanted to use a version of that vanity URL with some capitalisation, it will still work and direct to the correct page. E.g. if you set a page as /donatetoshelter, then a user typing /DonateToShelter or /DONATETOSHELTER will still be directed to the same place.

  • Avoid dashes, hyphens, plus signs, ampersands, underscores or any other extra characters in an attempt to space out words.

  • If the vanity URL is more than one word, use shelter.org.uk/pennyanddexter rather than /PennyAndDexter or /penny-and-dexter or /penny_and_dexter

3️⃣ Add the destination URL

  • In the URL field add the full URL (the destination) you want your vanity URL to redirect to

  • For donate pages, you’ll also need to add the campaign activity code as reserved_appeal_code e.g. https://england.shelter.org.uk/donate?reserved_appeal_code=20210510-IG-10

  • This destination page must be live for the vanity URL to work

  • If your destination URL is from a subdomain such as https://campaigns.shelter.org.uk the vanity URL you are creating will be from the main website:

www.shelter.org.uk/penny is your vanity URL rather than https://campaigns.shelter.org.uk/penny or www.campaigns.shelter.org.uk These will generate error codes. This goes for any Shelter subdomain.

4️⃣ Campaign - add the UTM campaign ID. See this page for guidance.

5️⃣ Medium - this relates to the UTM medium type (utm_medium)

Dependent on where the vanity URL is appearing, it should be set to one of the following:

  • as a default, the medium should be set to direct

  • for print media campaigns, use print

  • for QR codes, use qrcode

  • for a TV campaign, use tv

  • if the vanity URL is being sent out by a corporate / celebrity partner, use partner_link

6️⃣ Content - add the utm_content (optional)

The utm_content tag is optional, but useful if you want to track vanity URLs with the same campaign ID in multiple different places.

For example, if vanity URLs were used in Winter Appeal adverts across the Big Issue, The Guardian and the Daily Express. You could use big_issue, guardian and daily_express as content tags to track these vanity URLs separately in GA4 and see how many people used them.

7️⃣ Publish your vanity URL

Your vanity URL is live! A utm_source tag will automatically be added and set to vanityurl, this is not configurable through the CMS.

8️⃣ Test your vanity URL is working before sharing it

  • The destination URL must be live and the vanity URL published in order to test

  • Remember: For anyone connected to the internal Shelter network - anyone in the office on the VPN - they may need to add www. to the beginning of their published vanity URL in order to view it eg. www.shelter.org.uk/penny This will not be an issue for external users.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.