AEM - ROBOTS.Txt file not showing content instead it's downloading | Community
Skip to main content
December 8, 2021
Solved

AEM - ROBOTS.Txt file not showing content instead it's downloading

  • December 8, 2021
  • 2 replies
  • 2715 views

Hi Team,

Can you please help me with below issue.

We have created robots.txt file to deny access to crawlers on some paths but we are facing below issue.

 Steps we followed:

   1. Created robots.txt file in DAM path(/content/dam/folder)

   2. Added relevant content as per business rules

   3. Allowed robots.txt path by adding rules in filters& added rewrite rules in dispatcher and restarted apache server

   4. When we hit url(https:host:port/robots.txt) it's downloaded instead of opening.

 

Thanks,

Swamulu

   

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kishore_Kumar_

Hi @swamulu143 ,

 

It might be due to content disposition, Can you please try adding a path in Apache Sling Content Disposition Filter as mentioned in below link.

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-allow-a-robots-txt-file-to-be-visible-on-browser-when/td-p/430829 

 

2 replies

Raja-Karuppsamy
Community Advisor
Community Advisor
December 8, 2021

Can you tell me what's the issue here ?

December 8, 2021

Hi Raja,

Robots.txt file is downloading instead of opening file when we hit Url.

 

 

 

Kishore_Kumar_
Kishore_Kumar_Accepted solution
Level 9
December 8, 2021

Hi @swamulu143 ,

 

It might be due to content disposition, Can you please try adding a path in Apache Sling Content Disposition Filter as mentioned in below link.

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-allow-a-robots-txt-file-to-be-visible-on-browser-when/td-p/430829 

 

arunpatidar
Community Advisor
Community Advisor
December 8, 2021

Hi,

Can you check if the response header, if it has this header then you can remove this header from httpd server for this file

 

Content-Disposition: attachment; filename="robots.txt"

 

Arun Patidar