If Google Search Console is not recognizing your robots.txt file in Webflow, it's likely due to how Webflow handles the file and not due to incorrect placement.
Webflow allows you to add robots.txt instructions in the SEO > Indexing section, but there are a few limitations and checks involved.
1. How Webflow Manages robots.txt
- Webflow does not upload robots.txt as a standalone file; it dynamically generates it based on what you input into the Settings > SEO > Indexing > robots.txt field.
- The URL for the robots.txt file will be available at yourdomain.com/robots.txt after publishing.
2. Confirm File Is Being Served
- Visit your live site at /robots.txt, e.g., https://yourdomain.com/robots.txt.
- You should see the content you added in the Webflow indexing section.
- If the URL shows a 404 or blank page, ensure:
- Your site has been published after editing the field.
- You published to the correct domain (including custom domains if applicable).
3. Check Formatting and Content
- Make sure your robots.txt content follows proper formatting:
- Example:
User-agent: *
Disallow: /private-folder/
- Invalid syntax can lead to Google ignoring the file.
4. Google Search Console Troubleshooting
- Go to Google Search Console > Robots.txt Tester.
- Enter the correct domain and verify that Google can access /robots.txt.
- If Google says it can't access or recognize it:
- Check DNS and hosting propagation if you recently updated domains or DNS.
- Make sure HTTPS is correctly configured and accessible (robots.txt must be served over HTTPS for secure sites).
5. Webflow Limitations
- Webflow does not support dynamic or conditional output of robots.txt content.
- If you’re trying to manage robots.txt for a multilingual or subdirectory-based variation, Webflow won't handle that granular level of control.
Summary
The correct way to add a robots.txt file in Webflow is via the SEO > Indexing section, but for Google to recognize it:
- Ensure it's published to your live domain.
- Verify the file is accessible at yourdomain.com/robots.txt.
- Use correct syntax and formatting.
- Use Search Console tools to test access.
If all checks out and Google still doesn’t detect it, the issue may be temporary due to crawl delays or DNS propagation.