How can I block my website in other countries?

by 6 replies
7
Lets assume my website is mywebsite.com. I need to block the website for all the countries except India. But we need to handle the block gracefully, i.e. showing a page that right now the site is not providing services in their country.

Page on my website visible in India:
mywebsite.com/category.php

When someone outside India opens the website they should see the following URLs:
mywebsite.com/world/category.php

Kindly note that Google Search should always show the URLs without "world" in there.

Following are the solutions I have on mind:

Scenario:
Someone tries to open mywebsite.com/category.php from US.
The code will check for the IP location and the user would be redirected to mywebsite.com/world/category.php

Solution1: Add no follow and no index tags on mywebsite.com/world/category.php so that Google does not index this page and use a 302 redirection. This page will be served to everyone from outside India.

Solution2: Add a 302 redirect from mywebsite.com/category.php to mywebsite.com/world/category.php
and also add canonical on mywebsite.com/world/category.php as website.com/category.php
Problem in this approach is loop for Google bot, first we are doing a redirect and then we are putting a canonical to the one which as redirected. Sounds wrong to me but I am not sure

Note: This question is related SEO strategy. I want your suggestions on my SEO strategy. I do not want any technical solution for redirection from .htaccess or IP blocking outside India traffic .
#search engine optimization #block #countries #website
    • [1] reply
    • [DELETED]
    • [DELETED]
    • Thank you for sharing useful article.

      I do not want to block country from accessing my website. I have updated my question kindly read and reply accordingly.

  • Use your robots file to filter your traffic by IP and redirect them to a custom page

    You need the right GEO IP blocks though
  • Try this article may b it will help you https://www.raymond.cc/blog/easily-b...sing-htaccess/
    • [1] reply
    • Thank you for sharing this useful information.

      But I just wanted to confirm whether my SEO strategy is correct or not. I have updated the question kindly read and reply accordingly.

  • Thank you so much with regard to revealing useful report.

    Anyways, i do n't need so that you can prohibit area from searching your blog. I've up graded your concern kindly go through and additionally reply appropriately.

Next Topics on Trending Feed

  • 7

    Lets assume my website is mywebsite.com. I need to block the website for all the countries except India. But we need to handle the block gracefully, i.e. showing a page that right now the site is not providing services in their country. Page on my website visible in India: