Forum Moderators: phranque
Cheers :)
Even without such duplication, you are at serious risk of duplicate content issues; if you set up the extra domain and consciously duplicate your content onto it, well, you are asking for trouble.
What's the objection to a plain old fashioned 301, which would allow the user to type in www.sub.domain.com OR sub.domain.com and be able to view the page?
[edited by: Quadrille at 10:22 am (utc) on Feb. 4, 2009]
My advice would stand - do the 301 - all the user would see different is the 'www' missing - which would neither hurt nor surprise them (if they noticed at all - most would not!).
If they did notice, you'd be doing them a favour, as they'd learn that they don't need to add the www.
Many argue that even domain.com does not need a 'www' - and technically, it doesn't - but convention is strongly pro-www
But for subdomains, not only do you NOT need it, it really does create hassle and extra work (as you've found!), and the convention is NOT to use it.
Life's complicated enough without looking for trouble - but it's your site ... ;)
You absolutely DO need the redirect. To not have it means you effectively have two sites serving Duplicate Content.
*** All I want is user may type in www.sub.domain.com OR sub.domain.com he should be able to view the page. ***
That's exaxctly what the redirect is for. You ask for "A" and you get the content. You ask for "B", get redirected to "A" and get the content - without risk of "B" being indexed as a Duplicate URL.
Install a site-wide 301 redirect, one that preserves the requested file path within the redirect, and you'll be fine.
*** what i want is when user types in www.sub.domain.com i do not want them to see sub.domain.com in the address bar it should stay as what they typed in www.sub..... or sub..... ***
Can't be done. What you are proposing to do is the exact definition of what Duplicate Content is.
If they insist on this, then you need to make sure that every page when served via an alternative subdomain has a meta robots noindex, nofollow tag dynamically inserted into it for all variations of URL except for the one exact domain that you do wish to be spidered and indexed.