Manage vanity URLs
Vanity URLs in CQ
You define Vanity URLs in CQ to create easy-to-remember and easy-to-search URLs on your website.
The following video demonstrates how to define a Vanity URL for a specific page on your website.
Adobe CQ: Create a vanity URL
Verify the vanity URL
To verify the vanity URL that you created using the steps in the video, do the following:
- Go to the Adobe CQ5 Web Console (http://localhost:4502/system/console/jcrresolver).
- Enter the name of the vanity URL in the Test text box of the Configuration Test section and click Resolve.
The result of the test appears in the next line.
If you defined the URL correctly, the path value in the result displays the resolved URL.
You can also use the Sling Resource Resolver to verify issues that you face when creating vanity URLs.
For example, if the vanity URL does not exist:
Also, you defined a vanity URL but when you test the URL on the browser, another page shows up.
Again, you can use the Sling Resource Resolver to verify the resolved URL for a vanity URL. For example, you defined the same vanity URL (dealoftheday) for two pages on your website.
This issue occurs since you define vanity URLs by page. So it's necessary to go to a specific page to define a vanity URL for that page. In this case, you inadvertently set the same vanity URL for two pages.
To get around this issue, you can either go to the Sling Resource Resolver and go through the list of Resolver Map Entries. This list contains defiend vanity URLs.
Alternatively, you can use the URL Mapping feature of CQ to replicate this functionality.
To create a URL map between a /content URL in your repository and a shortened URL:
- Go to the Configuration tab of the Adobe CQ5 Web Console (http://localhost:4503/system/console/configMgr).
- Go to the Apache Sling JCR Resource Resolver section.
- Click the + sign in the URL Mappings section.
- In the new text box, enter the resolved URL and the vanity URL.
- Click Save.
- Finally, follow the steps to verify your vanity URL, goingforgold.
Conectați-vă la cont