Last active
May 18, 2020 15:48
-
-
Save fjarrett/af27fba2c689901a8f64c74985dbebac to your computer and use it in GitHub Desktop.
Block robots from crawling alias domains
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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