How to remove /home from URL AEM?

Avatar

Avatar

jezwn

Avatar

jezwn

jezwn

21-09-2020

What's the best approach to remove "/home" from home page.

AEM home page:
https://localhost:4502/sites.html/content/companyname/home

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

BrianKasingli

MVP

Avatar

BrianKasingli

MVP

BrianKasingli
MVP

21-09-2020

You can change the node name. There are two easy ways to achieve this.

1. Touch UI.

- Use the "move the page" functionality.

BrianKasingli_0-1600683127009.png

Touch UI will take care of the re-publish and un-publish of the page, and also it's references.

 

2. CRX/DE console
You can change the node name from the CRX/DE console, http://localhost:4502/crx/de/index.jsp#content/companyname/home, change this to home2 for example.

- Making sure you un-publish the page first, then re-publish the page after the change. This method will not be as handy as the Touch UI way, where references page links would not be automatically updated, and re-published.

 

3. Delete the page (from the Touch UI or CRX/DE)

If you don't want the /content/companyname/home page, just delete it.... making sure you unpublish the page first; no reference checks & clean up are done here.

Answers (1)

Answers (1)

Avatar

Avatar

vanegi

Employee

Avatar

vanegi

Employee

vanegi
Employee

21-09-2020

 

You can implement either sling:alias or vanity url feature for this use case.

sling:alias – The property may be set on any resource to indicate an alias name for the resource. For example the resource /content/home may have the sling:alias property set to test allowing the resource to be addressed in an URL as /content/test.

Vanity URL - You define Vanity URLs in CQ to create easy-to-remember and easy-to-search URLs on your website.