In short
Ahrefs flags "Robots.txt has too many redirects or redirect loop" when fetching /robots.txt leads through several redirects or loops back on itself. Google follows at least five redirect hops for robots.txt; if it still can't reach the file, it treats it as not found, which means no crawl restrictions at all. Serve robots.txt directly (status 200) on your main host.
Robots.txt should load directly from the root of each host. Redirects there cause more trouble than on normal pages.
Check it
curl -sIL https://example.com/robots.txt | grep -iE "^(HTTP|location)"
One redirect from http:// or the non-preferred host to the main host is normal. More hops, or a loop, need fixing.
Common causes
| Cause | Fix |
|---|---|
| Chained HTTP → HTTPS → www → trailing-slash rules | Combine into one redirect; robots.txt needs no slash |
| Conflicting CDN and server rules | See "Redirect loop" |
| A catch-all rule redirecting unknown files to the home page | Exclude /robots.txt from the rule |
| Robots.txt served by an app route that redirects | Serve a static file instead |
After fixing, check the robots.txt report in Search Console to confirm Google fetches it successfully.
This guide isn't affiliated with or endorsed by Ahrefs.
Related issues
Sources and references
Google Search Central, How Google interprets the robots.txt specification
Google Search Console Help, robots.txt report

About the author
Nazmul Nikhil
Head of SEO & Assistant Manager, Digital Marketing at Notionhive
SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.



