{"id":171,"date":"2016-01-06T04:09:24","date_gmt":"2016-01-06T04:09:24","guid":{"rendered":"https:\/\/www.autowoven.com\/adobe-blog\/?p=171"},"modified":"2018-01-16T16:00:59","modified_gmt":"2018-01-16T16:00:59","slug":"getting-vanity-urls-right-in-an-adobe-aem-implementation","status":"publish","type":"post","link":"https:\/\/www.autowoven.com\/adobe-blog\/getting-vanity-urls-right-in-an-adobe-aem-implementation\/","title":{"rendered":"Getting Vanity URLs right in an Adobe AEM implementation"},"content":{"rendered":"<div style=\"padding-bottom:20px; padding-top:10px;\" class=\"hupso-share-buttons\"><!-- Hupso Share Buttons - https:\/\/www.hupso.com\/share\/ --><a class=\"hupso_toolbar\" href=\"https:\/\/www.hupso.com\/share\/\"><img src=\"https:\/\/i0.wp.com\/static.hupso.com\/share\/buttons\/share-medium.png?w=1200&#038;ssl=1\" style=\"border:0px; padding-top: 5px; float:left;\" alt=\"Share Button\" data-recalc-dims=\"1\"\/><\/a><script type=\"text\/javascript\">var hupso_services_t=new Array(\"Twitter\",\"Facebook\",\"Google Plus\",\"Pinterest\",\"Linkedin\",\"Email\");var hupso_background_t=\"#EAF4FF\";var hupso_border_t=\"#66CCFF\";var hupso_toolbar_size_t=\"medium\";var hupso_image_folder_url = \"\";var hupso_url_t=\"\";var hupso_title_t=\"Getting%20Vanity%20URLs%20right%20in%20an%20Adobe%20AEM%20implementation\";<\/script><script type=\"text\/javascript\" src=\"https:\/\/static.hupso.com\/share\/js\/share_toolbar.js\"><\/script><!-- Hupso Share Buttons --><\/div><p>So your friendly marketing\u00a0executive calls to say he needs a Vanity URL for a page on your AEM hosted site. And you cringe. How do you get this done right without getting penalized by Search Engines? Should you do this at the Load Balancer level? Within AEM Dispatcher configurations? within AEM Publish instance? What about horizontal replication of these configurations? And oh, who&#8217;s going to maintain this? It&#8217;s not like your Dev Ops team is necessarily twiddling their thumbs waiting for work.<\/p>\n<p>This post will address a few different ways to accomplish Vanity URLs within an Adobe AEM implementation and discuss some pros and cons.<\/p>\n<p><!--more--><\/p>\n<p>Most well-architected AEM implementations have a 80-20 or even a 90-10 rule. ie., serve 80 or 90% of web traffic from your Dispatcher without hitting the AEM publish instance. That means it is best to implement URL rewrites (ie., Vanity URLs) at the Webserver or the Dispatcher level.<\/p>\n<p>Here&#8217;s a good\u00a0resource on \u00a0how it can be done using in Apache HTTP server (note that this has nothing to do with Adobe AEM):<\/p>\n<p>http:\/\/httpd.apache.org\/docs\/2.0\/misc\/rewriteguide.html<\/p>\n<p>However, if you want to approach this entirely from an AEM product stack perspective, you can achieve that as follows.<\/p>\n<p>1. Setting Vanity URLs within the AEM page properties:<br \/>\nHere&#8217;s a screenshot that shows how the Vanity URL for a page is set. This is a great technique WHEN you are fine with the content authors having the ability to change this property.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/blog.autowoven.com\/wp-content\/uploads\/2016\/01\/aem-vanity-url.png\" rel=\"attachment wp-att-272\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-272\" src=\"https:\/\/i0.wp.com\/blog.autowoven.com\/wp-content\/uploads\/2016\/01\/aem-vanity-url-300x270.png?resize=300%2C270\" alt=\"aem-vanity-url\" width=\"300\" height=\"270\" data-recalc-dims=\"1\" \/><\/a><br \/>\nIn addition CQ5 provides the &#8220;Alias&#8221; page property. See screenshot below.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/blog.autowoven.com\/wp-content\/uploads\/2016\/01\/aem-alias2.png\" rel=\"attachment wp-att-273\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-273\" src=\"https:\/\/i0.wp.com\/blog.autowoven.com\/wp-content\/uploads\/2016\/01\/aem-alias2-300x201.png?resize=300%2C201\" alt=\"aem-alias2\" width=\"300\" height=\"201\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Aliases do not change the path to the page, but rather provide an alternate name to the page. For example, this is useful when you would like the pagename to be different in different languages.<\/p>\n<p>&nbsp;<\/p>\n<p>2. Now, let&#8217;s say you are positive that you do not want your content team making changes to vanity URLs or Aliases, you could rely on Apache Felix (the underlying application server that hosts your Publish and Author instance). These configurations are typically only allowed for Administrators. The following screenshot of the Sling Resource Resolver should help you with this configuration.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/blog.autowoven.com\/wp-content\/uploads\/2016\/01\/aem-sling-resource-resolver.png\" rel=\"attachment wp-att-275\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-275\" src=\"https:\/\/i0.wp.com\/blog.autowoven.com\/wp-content\/uploads\/2016\/01\/aem-sling-resource-resolver-300x137.png?resize=300%2C137\" alt=\"aem-sling-resource-resolver\" width=\"300\" height=\"137\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Programmatically, you may access the mapping like so:<\/p>\n<p>resourceResolver.map(slingRequest,path);<\/p>\n<p>3. Now, there&#8217;s yet another way to accomplish rewrites within AEM, which is to configure your \/etc\/map. Here are the steps:<\/p>\n<p>1. configuration tree located below \/etc\/map<br \/>\n2. create a new folder: type sling:Mapping<br \/>\n3. define sling:match &#8211; partial regular expression which is used instead of the node&#8217;s name to match the incoming request<br \/>\n4. define sling:redirect or sling:internalRedirect depending on the type of redirect<\/p>\n<p>&nbsp;<\/p>\n<p>I hope that gave you an idea on different ways in acheiving similar goals.<\/p>\n<p>&nbsp;<\/p>\n<p>Until next time!<\/p>\n","protected":false},"excerpt":{"rendered":"<div style=\"padding-bottom:20px; padding-top:10px;\" class=\"hupso-share-buttons\"><!-- Hupso Share Buttons - https:\/\/www.hupso.com\/share\/ --><a class=\"hupso_toolbar\" href=\"https:\/\/www.hupso.com\/share\/\"><img src=\"https:\/\/static.hupso.com\/share\/buttons\/share-medium.png\" style=\"border:0px; padding-top: 5px; float:left;\" alt=\"Share Button\"\/><\/a><script type=\"text\/javascript\">var hupso_services_t=new Array(\"Twitter\",\"Facebook\",\"Google Plus\",\"Pinterest\",\"Linkedin\",\"Email\");var hupso_background_t=\"#EAF4FF\";var hupso_border_t=\"#66CCFF\";var hupso_toolbar_size_t=\"medium\";var hupso_image_folder_url = \"\";var hupso_url_t=\"\";var hupso_title_t=\"Getting%20Vanity%20URLs%20right%20in%20an%20Adobe%20AEM%20implementation\";<\/script><script type=\"text\/javascript\" src=\"https:\/\/static.hupso.com\/share\/js\/share_toolbar.js\"><\/script><!-- Hupso Share Buttons --><\/div><p>So your friendly marketing\u00a0executive calls to say he needs a Vanity URL for a page on your AEM hosted site. And you cringe. How do you get this done right without getting penalized by Search Engines? Should you do this at the Load Balancer level? Within AEM Dispatcher configurations? within AEM Publish instance? What about &#8230; <a title=\"Getting Vanity URLs right in an Adobe AEM implementation\" class=\"read-more\" href=\"https:\/\/www.autowoven.com\/adobe-blog\/getting-vanity-urls-right-in-an-adobe-aem-implementation\/\" aria-label=\"Read more about Getting Vanity URLs right in an Adobe AEM implementation\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[4],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9yYEC-2L","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":33491,"url":"https:\/\/www.autowoven.com\/adobe-blog\/aemaacs-vs-traditional-aem\/","url_meta":{"origin":171,"position":0},"title":"AEMaaCS vs. Traditional AEM: Which One is Right for Your Business?","date":"December 3, 2024","format":false,"excerpt":"When it comes to choosing a content management system for your business, the decision between Adobe Experience Manager as a Cloud Service (AEMaaCS) and the more traditional Adobe Experience Manager on-premise solution can be quite the overwhelming task at hand. A company has a lot of choices to think of\u2026","rel":"","context":"In &quot;AEMaaCS Migration&quot;","img":{"alt_text":"AEMaaCS vs. Traditional AEM","src":"https:\/\/i0.wp.com\/www.autowoven.com\/adobe-blog\/wp-content\/uploads\/2024\/12\/AEMaaCS-vs.-Traditional-AEM.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":268,"url":"https:\/\/www.autowoven.com\/adobe-blog\/adobe-and-magento\/","url_meta":{"origin":171,"position":1},"title":"Adobe Marketing Cloud and Magento Commerce &#8211; is this marriage right for you?","date":"May 22, 2018","format":false,"excerpt":"May 21, 2018 is a big day for Adobe. It announced it's purchase of Magento Commerce for 1$1.6B, and the stock market responded with enthusiasm. Shopify - Magento's competitor, saw it's shares sink and Adobe's valuation go up. An indication that investors see this as the right move. Is a\u2026","rel":"","context":"In &quot;Adobe Marketing Cloud&quot;","img":{"alt_text":"adobe magento","src":"https:\/\/i0.wp.com\/www.autowoven.com\/adobe-blog\/wp-content\/uploads\/2018\/05\/Adobe.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":379,"url":"https:\/\/www.autowoven.com\/adobe-blog\/7-mistakes-of-ams\/","url_meta":{"origin":171,"position":2},"title":"7 Mistakes to avoid when moving to Adobe Managed Services (AMS)","date":"February 7, 2020","format":false,"excerpt":"\u201cThere\u2019s no way that company exists in a year.\u201d\u00a0~\u00a0Tom Siebel, Founder of Siebel CRM Systems, speaking about Salesforce.com Haha. We all know where Siebel is now vs Salesforce. And it is inevitable where the future of computing is. Technology and services are migrating to the Cloud. Predictions otherwise have proven\u2026","rel":"","context":"In &quot;Adobe Analytics&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.autowoven.com\/adobe-blog\/wp-content\/uploads\/2019\/03\/AMS-Cloud.png?fit=1024%2C512&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":33484,"url":"https:\/\/www.autowoven.com\/adobe-blog\/what-is-aem-as-a-cloud-service\/","url_meta":{"origin":171,"position":3},"title":"What is AEM as a Cloud Service? A Complete Guide for Beginners","date":"December 1, 2024","format":false,"excerpt":"The ability to manage digital experiences affect the success of any organization in this current age. To assist companies with meeting their every changing content expectations, Adobe Experience Manager (AEM) as a Cloud service provides assistance within their field. This makes the task of developing, administering, and supplying robust digital\u2026","rel":"","context":"In &quot;AEMaaCS Migration&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.autowoven.com\/adobe-blog\/wp-content\/uploads\/2024\/12\/AEM-as-a-Cloud-Service.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":174,"url":"https:\/\/www.autowoven.com\/adobe-blog\/6-takeaways-from-adobe-summit-2015-aem6\/","url_meta":{"origin":171,"position":4},"title":"6 takeaways from Adobe Summit 2015 #AEM6","date":"March 17, 2015","format":false,"excerpt":"Even before the Adobe Summit, that took place in March\u00a09th to 13th, 2015 in Salt Lake City, UT, Forrester had this to say \"Adobe was a runaway winner across a broader digital experience delivery portfolio\".\u00a0 Adobe put a great show (including a concert by Imagine Dragons!) and displayed a wide\u2026","rel":"","context":"Similar post","img":{"alt_text":"summit","src":"https:\/\/i0.wp.com\/blog.autowoven.com\/wp-content\/uploads\/2015\/03\/summit-300x155.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":8353,"url":"https:\/\/www.autowoven.com\/adobe-blog\/7-secrets-about-aem-as-a-cloud-service\/","url_meta":{"origin":171,"position":5},"title":"7 Secrets about AEM as a Cloud Service","date":"January 18, 2023","format":false,"excerpt":"Adobe Experience Manager (AEM) is a powerful content management system (CMS) that is widely used by organizations of all sizes to create and manage digital experiences. One of the key differentiators of AEM is that it is available as a cloud service, which provides a number of benefits over traditional\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.autowoven.com\/adobe-blog\/wp-json\/wp\/v2\/posts\/171"}],"collection":[{"href":"https:\/\/www.autowoven.com\/adobe-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.autowoven.com\/adobe-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.autowoven.com\/adobe-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.autowoven.com\/adobe-blog\/wp-json\/wp\/v2\/comments?post=171"}],"version-history":[{"count":2,"href":"https:\/\/www.autowoven.com\/adobe-blog\/wp-json\/wp\/v2\/posts\/171\/revisions"}],"predecessor-version":[{"id":173,"href":"https:\/\/www.autowoven.com\/adobe-blog\/wp-json\/wp\/v2\/posts\/171\/revisions\/173"}],"wp:attachment":[{"href":"https:\/\/www.autowoven.com\/adobe-blog\/wp-json\/wp\/v2\/media?parent=171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.autowoven.com\/adobe-blog\/wp-json\/wp\/v2\/categories?post=171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.autowoven.com\/adobe-blog\/wp-json\/wp\/v2\/tags?post=171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}