Can we change AEM redirects on page properties from 302 to 301 as default?



In AEM page properties, we can set URL redirects. Adobe support informed that these are 302 redirects.


Is there a way to override this so by default they become 301 redirects and not 302?

Accepted Solutions (1)

Accepted Solutions (1)




This redirection of request URLs in AEM can be configured at the Sling level, typically in the mapping configuration under /etc/map node. There are two ways of changing the status code:


1) By sling:status property


You can use sling:status property to set a specific status code for a particular redirection. Here is an example:



      +-- http


           |    +-- sling:redirect = ""

           |    +-- sling:status = "301"


Please check the document [0] for more details.





2) Via OSGI configuration


Another way, which really sets the default for all redirection, is to configure the status code at the OSGi bundle level. In the OSGi console, browse the the Configuration page and locate: “Apache Sling Resource Resolver Factory” and change the redirect status field to whatever status code is appropriate.