Keep your development site copy from indexing in google

This is a common problem amongst developers. We have a non-public development server but then need to use the google tools to test seo, google tags and other stuff. So, the site has to be put on a public server but it is still on a temporary domain, or the client has not approved it yet. We are faced with the issue of blocking robots.
To block google bots in a redundant matter:
Create a robots.txt file in the root of the site and past the following code inside
User-agent: *
Disallow: /

Add this meta tag to the header of all pages

In wordpress it is also possible to check the option “Discourage search engines from indexing this site” in Settings > Reading

This works fine for the nice robots like google but it is just a suggestion, these methods do not actually prevent the robots from crawling the site if they want to.