- Total Members: 263,746
- Threads: 453,996
- Posts: 1,062,371
Great community. Great ideas.
Welcome to SEOChat, a community dedicated to helping beginners and professionals alike in improving their Search Engine Optimization knowledge. Sign up today to gain access to the combined insight of tens of thousands of members.
-
Dec 3rd, 2012, 03:39 PM
#1
Geo-filter script has damaged or SEO - help!
Hi, I'm new to these forums so hopefully this post is in the correct place.
The company I do web development for geo-blocks about 80% of their website using a page script which detects time on ones computer, then sends them to an 'International Visitors' page if their time is from outside the New Zealand / Australia time zones.
As a result, only the remaining 20% of pages (which are not our most important content such as the About page) are visible in Google search results. The internal website search uses Google CSE and so the search results from this also only show pages from the non-geo-blocked pages. Not surprisingly, we receive many complaints from users being unable to find content relevant to their searches.
I have tried (unsuccessfully) arguing that the filter be removed since it's easy to bypass by turning off scripts, and is ineffective. So assuming it has to stay in place, does anyone know if there is something which can be included in a script such as this, to let Google and other search engines index the full website again?
JavaScript:
<script type="text/javascript">
function t1() {}
function TimezoneDetect(){
var dtDate = new Date('1/1/' + (new Date()).getUTCFullYear());
var intOffset = dtDate.getTimezoneOffset();
var intMonth;
var intHoursUtc;
var intHours;
var intDaysMultiplyBy;
//go through each month to find the highest offset to account for DST
for (intMonth=0;intMonth < 12;intMonth++){
//To ignore daylight saving time look for the highest offset.
if (intOffset < (dtDate.getTimezoneOffset())){
intOffset = (dtDate.getTimezoneOffset());
}
//go to the next month
dtDate.setUTCMonth(dtDate.getUTCMonth() + 1);
}
return intOffset;
}
function CheckTimeZoneBlocking()
{
var clientGMtHours = TimezoneDetect();
if(whiteListedTimeZoneOffsets && whiteListedTimeZoneOffsets.length > 0)
{
var isBlocked = true;
for(var i = 0; i < whiteListedTimeZoneOffsets.length; i ++)
{
//alert(String(clientGMtHours) + " " + whiteListedTimeZoneOffsets[i] )
if(String(clientGMtHours) == whiteListedTimeZoneOffsets[i])
{
isBlocked = false;
}
}
if(isBlocked)
{
window.location = redirectUrl;
}
}
}
var whiteListedTimeZoneOffsets = new Array('-570','-600','-720');
var redirectUrl = '/page/pageid/2145859475/International_Visitors'
CheckTimeZoneBlocking();
</script>
-
Dec 3rd, 2012, 04:30 PM
#2
You can use a user agent check and not execute the script (or just allow it) when the user agent is Googlebot and any of the other major search engine bots.
Its a pretty simple fix to this situation.
This is called cloaking which is technically not allowed, but for this purpose I would say it is fine to do.
-
Dec 3rd, 2012, 04:48 PM
#3
Thanks! Where can I find more information about how to do this specifically?
-
Dec 3rd, 2012, 08:52 PM
#4
It depends on how you implement it, if you have the script deal with it (which is what I would do) or if you use the server to send specific user agents to different locations.
The former is just a bit of javascript - pull the user agent into a variable and produce an IF function based on this to handle it.
The later would use .htaccess user agent redirecting.
As with most things in life, a brief Google search will find the answer.
-
Dec 4th, 2012, 04:50 PM
#5
Thanks again, really appreciate the advice. Just one more question (which I couldn't find a definitive answer to on Google). Will doing this server side avoid the risk of being blacklisted by Google for cloaking? I'm keen to give it a go but dont want to risk being blacklist entirely.
Similar Threads
-
By bigdoug in forum Google Optimization
Replies: 75
Last Post: Jul 6th, 2005, 10:35 PM
-
By OPTOUT in forum Google Optimization
Replies: 55
Last Post: Apr 18th, 2004, 07:53 AM
-
By relaxzoolander in forum Google Optimization
Replies: 42
Last Post: Nov 23rd, 2003, 03:49 PM