Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

swamulu143
Level 1
Level 1

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

   

1 Accepted Solution
kishorekumar14
Correct answer by
Level 10
Level 10

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-... 

 

View solution in original post

4 Replies
swamulu143
Level 1
Level 1

Hi Raja,

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

 

 

 

kishorekumar14
Correct answer by
Level 10
Level 10

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-... 

 

Arun_Patidar
Community Advisor
Community Advisor

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"