Blogs > Implementing redirects and response header in Edge Delivery Services
AEM EDS
Implementing redirects and response header in Edge Delivery Services
| December 25, 2024Happy to find you here. Welcome to another learning.
What is Redirects?
Redirects in AEM Edge Delivery Service (EDS) are mechanisms to route user requests from one URL to another at the edge server level, reducing latency and improving performance. These redirects occur before requests reach the AEM origin server, ensuring faster response times and efficient content delivery.
Redirects can be done for internal links as well external links.
Internal links- redirects within the website.
External links- redirects to the external webistes.
Internal redirect
Redirects within the website pages is basically internal redirects.
Steps to create Internal redirects
So, for the redirect rules you need to create the excel sheet with the name redirects in the root folder of the project.
Inside the sheet we need to create 2 columns with headers as "Source" and "Destination" as shown in the below image.In the source we will add source url and in destination we will add the url where it should redirects to.
Before the redirects rules when we hit /dm in the url we got 404 not found as you can see in the below image.
After creating the redirect rules we can see that it is redirecting to /demo/demo1 url.




External redirect
For external redirects in the same sheet if you replace destination with any external url you will see that it is landing to the external link

What is Custom HTTP Response Headers?
HTTP response headers in Adobe Experience Manager (AEM) Edge Delivery Service (EDS) are metadata sent back from the server to the client (usually a web browser) in response to an HTTP request. These headers provide information about the server's response, including status codes, content details, cache directives, and security policies. In the context of AEM EDS, headers play a critical role in controlling and optimizing the delivery of content at the edge.
Steps to add the response headers to the page
To add headers to the pages we need to create a folder with name β.helixβ under the root folder of our project.
Inside that folder we need to create the excel sheet with name as "headers".
In that sheet there will be three columns url, key and value.
url: in this column there will be path of folder and the header will be applied to the pages present under that folder.
key: it will have the key of the header.
value: the value column will contain the value of the header.
In the above image the header author will be applied to all the pages in the website and "cms" will be applied to the page present under the cms folder.
One more thing whenever you create this headers sheet you will get the option of activate and not publish this is due to security reasons.





Thanks for reading π