내용으로 건너뛰기

Assistance with AWS WAF Geo Blocking to Allow Only Indian Traffic Without Impacting Google SEO Analytics

0

I am looking to configure AWS WAF (Web Application Firewall) to allow traffic only from India, while blocking traffic from all other countries. My primary concern is ensuring that this setup does not disrupt Google SEO analytics, including website crawlers and tracking tools. To clarify, I’m not using CloudFront in my architecture

Could anyone kindly provide guidance on the following:

  1. How to implement geo-blocking in AWS WAF to allow traffic only from India?
  2. What steps should I take to ensure Google crawlers (like Googlebot) and other SEO services are not inadvertently blocked by this configuration?

Any insights or best practices would be much appreciated!

질문됨 일 년 전117회 조회

1개 답변
2
수락된 답변

The mechanism for doing this with the lowest overhead for yourself would be to make use of the AWS WAF Bot Control Group. This has categories for different types of bots, such as search engines which you could use to allow that type of traffic before blocking all other traffic from India. Check the "CategorySearchEngine" section in the docs here: https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html This would remove the need for you to maintain custom rules based on user agents etc and also add further assurance using mechanisms such as reverse IP lookups to validate "good" bots are who they say they are. But note that the Bot Control groups come at an additional cost above normal WAF rules. To block traffic from a specific geolocation use the following rule type: https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statement-type-geo-match.html Before you do either of those however, I would validate how much of a concern blocking crawler traffic sourced from India is in reality. For example, if you look at Google's documentation, their IP ranges mainly seem to be US and Indonesia based: https://developers.google.com/search/docs/crawling-indexing/verifying-googlebot . And if you did block crawlers from a particular region, would crawlers from other countries simply take their place?

AWS

답변함 일 년 전

전문가

검토됨 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.