Different robots.txt for staging server on Heroku

后端 未结 2 1668
滥情空心
滥情空心 2021-01-05 15:01

I have staging and production apps on Heroku.

For crawler, I set robots.txt file.

After that I got message from Google.

Dear Webmaster

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-05 15:41

    What about serving /robots.txt dynamically using a controller action instead of having a static file? Depending on the environment you allow or disallow search engines to index your application.

提交回复
热议问题