1

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?

  • 1
    add this in layout <head> <meta name="robots" content="NOINDEX,NOFOLLOW"/> </head> – Rakesh Donga Mar 27 at 7:42
3

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: /
  • Thanks Shoaib Munir – Asim Ali Mar 27 at 8:05
3

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

  • Thanks Rathod.. – Asim Ali Mar 27 at 8:05
  • working or not ? – Rk Rathod Mar 27 at 8:07
  • Yes working, but adding robots.txt is also a good solution. I cannot mark two answer correct, otherwise I would do that. +1 – Asim Ali Mar 27 at 8:24
  • Good answer though. +1 – Shoaib Munir Mar 28 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.