Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     

Redirect Default or Index (Website starting page) page with www

While doing SEO of site,then a situation arises that the website should be redirected with "www" so that the search engine do not spam website for repeatable contents or make penalty on site.

<script language="javascript" type="text/javascript">
var s="www";
if( == -1)

With this code if visitor will visit the site without www then this code will redirect that to url with www. If user has written and hit enter. The page will open, In this situation above code will automatically redirect user to

Share this article   |    Print    |    Article read by 3424 times
Rohit kakria
I am software developer, moderator of
Related Articles: No related article
Related Interview Questions: No related interview question