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
  • 1
    add this in layout <head> <meta name="robots" content="NOINDEX,NOFOLLOW"/> </head> Mar 27, 2019 at 7:42

2 Answers 2

4

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

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

4
  • Thanks Rathod..
    – Asim Ali
    Mar 27, 2019 at 8:05
  • working or not ? Mar 27, 2019 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, 2019 at 8:24
  • Good answer though. +1 Mar 28, 2019 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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