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
BedrockMission!

Learn more

View all

Sign in to view all badges

Robots.txt in not working in Publish instance

lovepreetk75597
Level 3
Level 3

Hi,

 

We have one requirement where we need to add robots.txt file into AEM to exclude our site from google search engine.. We have added the file on author and its working there but not working for publish instance.I have taken same package from author and import to publish instance but on publish we are getting 404 while trying to hit robots.txt directly through URL. Any help will be appreciated. Thanks in advance.

 

Regards,

Lovepreet 

4 Replies
Arun_Patidar
Community Advisor
Community Advisor

Are you accessing this vai dispatcher? Make sure .txt extension is enabled.

jbrar
Employee
Employee

In addition to what Arun mentioned, If you are getting 404 for the robot.txt file when directly accessing it via publisher(Bypassing dispatcher), make sure the anonymous user has access to the location of robot.txt file.

abhishekk962745
Level 2
Level 2

If you are on  6.4 and higher, make sure you add your domain (www.xyz.com) into your vhosts.any file under /etc/httpd/conf.dispatcher.d/vhosts

amogh-personal
Level 2
Level 2

Where that file is hosted? If it is under /content/you-project then try clearing your domain cache or if it is hosted under any specific restricted path then check the anonymous access. 

Thanks,
Amogh