Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Updating robots.txt is not working

Dmitriy Burdin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 31, 2018

Following this article  I edit robots.txt in the $JIRA-INSTALL/atlassian-jira but it has no effect. When accessing by url in the browser I see the default JIRA robots.txt content:

User-agent: *

I tried to restart JIRA and even the whole machine - still no effect.

2 answers

2 votes
Matthew Peronto
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 3, 2019

I ran into this issue as well.

It appears as if the last 10 characters of the robots.txt is being chopped off!

If I use the following for robots.txt in the file:

User-agent: *
Disallow: /
# 123456789123456789

 

I see the following in the url

User-agent: * Disallow: / # 12345678

 I did a work-around by using this as my robots.txt

User-agent: *
Disallow: /
# 1234567
Stephan Stahl February 23, 2021

Thanks for spotting this out @Matthew Peronto - I ran into exactly the same error.

Also: a long enough comment in front of the "actual" part seems to do the trick, too:

#0123456789012345678
User-agent: *
Disallow: /

So whenever a "minimum file length" is reached (48 characters for me, including linebreaks), the robots.txt seems to be delivered correctly.

I highly doubt this is a desired "standard behaviour"... @Kurtcebe Eroglu -> this might be added as side node to the mentioned KB article. This definitely does have impact on pages being found by search engines... (especially if the robots.txt is simply not "complete")

0 votes
Kurtcebe Eroglu
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 10, 2018

Hi Dmitriy,

If you had previously changed Context path for JIRA and serving jira from a non-root location of your JIRA domain, you may be checking the wrong file. For example, assume context path is jira. Then you're serving jira at some address like jira.mycompany.com/jira. The file you are modifying is now served at jira.mycompany.com/jira/robots.txt, and you may be checking jira.mycompany.com/robots.txt. This may be robots.txt defined elsewhere, like your web server. As explained in the article, you may try to find and modify this file instead.

Regards.

Suggest an answer

Log in or Sign up to answer