We just talk about this today here:
https://moz.com/community/q/default-robots-txt-in-wordpress-should-i-change-it
And here are Yoast configuration settings:
https://yoast.com/wordpress/plugins/meta-robots-wordpress-plugin/
https://yoast.com/prevent-site-being-indexed/
Since WordPress robots.txt is "virtual" file you need to create new file in root folder of site (usually this is same WP folder) and create that file. This is only where you need to edit it.