[warning] Search engines might be blocked if WP REST API is restricted
-
Hi nintechnet,
I’m writing this just to inform other users that if they plan to block all access to the REST API (like I did), might experience some drawbacks on search engines listing.Btw since you’ve listed my previous thread in your help section, I’d like to add something more about CIDR handling in .htninja file.
It is possible to use the same CIDR function for both allowed and blocked blocks. Just one has to make sure to use another name for the function, like this:foreach ( $cidr_array_no as $cidr ) { // Check IP vs CIDR: if ( ipCIDRCheck( $_SERVER['REMOTE_ADDR'], $cidr ) ) { // IP matches, block it: return 'BLOCK'; } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[warning] Search engines might be blocked if WP REST API is restricted’ is closed to new replies.