• Hi everyone

    I am building a website for which I require the users to provide in their email ( and one more detail) in order to read the content that is published on the website.

    However, since I want the website to be indexed well and good, no such restriction needs to be forced on the bots (search engine bots).

    The users should provide their email, populate one more field and then click I agree to terms, so as to see the content that is on the website.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    1. You can check the user-agent of a visitor to see if it’s a bot or not, but this user-agent string can be spoofed easily.
    2. You can get the hostname of the visitor’s IP address using gethostbyaddr() to make sure a user is really a search engine bot, see Verifying Googlebot.

    Be warned that this is known as Cloaking, which violates any search engine’s guidelines. There’s is no search-engine-friendly way of hiding content from users but showing the content from search engines.

    Hope that helps.

    Thread Starter foadbear

    (@foadbear)

    thanks for your reply.

    I see on many websites that users need to put in their email in order to see the content that is other wise blurred.

    I am looking for a solution like this.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You can’t have it both ways. You can mock a disabled page using JavaScript, but this isn’t as effective as you’d like.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to hide content from users (not search engine bots)’ is closed to new replies.