Enabling Google access via IP address

Discussion in 'Setting-up protection' started by iantresman3, Jan 2, 2017.

  1. iantresman3

    iantresman3 New Member

    Joined:
    Jan 30, 2011
    Messages:
    7
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Hello,

    Yes, you can do it. Just edit .htaccess file and add the following code right after
    RewriteEngine On
    Code:
    RewriteCond %{REMOTE_ADDR} ^127\.0\.0\.1$ [OR]
    RewriteCond %{REMOTE_ADDR} ^127\.0\.0\.2$ [OR]
    RewriteCond %{REMOTE_ADDR} ^127\.0\.0\.3$
    RewriteRule .* -  [L]
    You need to update my example code and use google IPs.

    FYI:

    I do not recommend to do it.

    1. Google and other search engines can access your pages from different IPs and in case they get different content for such request then they can make decision that you want to fool them and then can block your pages in search engine.

    2. Google can save it in archive and then any user can see your protected content in this archive.
    relapse likes this.
  3. iantresman3

    iantresman3 New Member

    Joined:
    Jan 30, 2011
    Messages:
    7
    Thanks for the feedback, and the pitfalls. Something to ponder.

Share This Page