Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Home page url with %20

critical issue for indexing

         

experienced

2:02 pm on Aug 17, 2007 (gmt 0)

10+ Year Member



this is very new to me that i have checked my site in google and found that my home page is indexed lke this

[%20...] and also without www and with www. I have 3 different version of the home page. I can sort the issue with www and non www but this [%20...] is very strange result i have got. when i click on the link it works and then the whole sites goes under [%20domain.com...]

would be helpful if gets in input

thanks

phranque

6:39 pm on Aug 17, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



there are countless threads in the apache forum [webmasterworld.com] on the subject of "domain name canonicalization".

jomaxx

6:42 pm on Aug 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your server is seeing "%20www" as a valid subdomain, for some reason. BTW, %20" is the encoding for a single blank space.

phranque

7:11 pm on Aug 17, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



the invalid domain on your incoming link is caused by someone who has encoded a blank in their link to your site.
you can't do anything about this unless the link happens to be on one of your pages, but you can fix the invalid indexing by using mod_rewrite (assuming apache server here).
you should be canonicalizing your domain no matter what...

jd01

7:19 pm on Aug 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This should help all canonicalization issues:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

Justin

As phranque noted: Check out the Apache Forum for more details.

experienced

4:50 am on Aug 18, 2007 (gmt 0)

10+ Year Member



thanks for the appreciated reply.

sorry for posting here bcoz i was not sure that this is the apache issue. well.. I have a window server so do u mean i have to shift this on linux apache or still i have something to fix this on windows. my hosting provider does not help in IIS setting or something..

jd01

5:01 am on Aug 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah, it's tough on IIS, because your host needs to install ISAPI_rewrite...

Justin

I'll edit out most of my thoughts, except I wouldn't use IIS for any reason... I won't even work IIS hosted sites, because of the hassles.

jomaxx

5:18 am on Aug 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The original post said that the whole website works under "%20www.domain.com". Am I crazy or should this not be happening? This sounds like more than a canonical problem to me.

jd01

7:45 am on Aug 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The problem is most likely 'wild card' domains are set to on, making *any* subdomain valid. It's probably set this way for a shared environment where some users will use some.example.com and another.example.com, but causes hassles for those who are only using one version, or would like to correct canonicalization problems.

My guess is [space]www.domain.com is resolving to the same 'site directory' as www and example.com. The correction with the ability to use mod_rewrite is simple.

It might be possible to correct with ASP if you can call a %{HTTP_HOST} server variable similar to PHP and then redirect using ASP. (Assuming the site is written is ASP.)

** These are just my 'best guesses', because this is not something I normally deal with. **

Justin