Whole website no-index, no-follow
Domanda
I am using Magento 2, and I have staging server, I don't want any crawler or bots to index my staging server.
So, I need whole website to be no-index, no follow. Is it possible in Magento?
Soluzione
Go to configuration
Content -> Design -> Configuration
Edit Global configuration
In Search Engine Robots tab, you can set Default Robots value to "Noindex, Nofollow"
In addition, create file robots.txt
in root
and pub/
directory. File content would be:
User-Agent: *
Disallow: /
Altri suggerimenti
You do not want to remove the tag from the code as this is a back-end setting. You can change the setting by logging in to your back-office then go to
Content -> Design -> Configuration
then click on the correct storeview. Under the tab Search Engine Robots
you find the option
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange