Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Block robots from crawling alias domains
<?php
add_filter( 'option_blog_public', function ( $blog_public ) {
if ( empty( $_SERVER['HTTP_AKAMAI_ORIGIN_HOP'] ) && empty( $_SERVER['HTTP_X_DSA_HOST'] ) ) {
$blog_public = false;
}
return $blog_public;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment