New messages Members Forum rules Search
  • Page 1 of 1
  • 1
Forum moderator: kostova  
uCoz Support Forum by uCozers » uCoz » General Questions » How do I redirect example.com to www.example.com? (sml[Default]How to redirect from non-www to www website?)
How do I redirect example.com to www.example.com?
BadBoyDate: Tuesday, 2009 June 02, 9:58 AM | Message # 1
Font size: A | A |
Lieutenant
Group: uCozer
Message: 74
[ ]
Offline
How do I redirect example.com to www.example.com with out using JavaScript code?
Before updates we had a field in Common Settings where we could type in the url of the website we want to redirect.
I used to use that field to redirect users that typed in my website address with out www. to the www. one.
If someone knows how please tell me where to go.
 
jackassDate: Tuesday, 2009 June 02, 10:44 AM | Message # 2
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
Now there is no such a feature, but you can use this script to redirect

Quote

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
window.location="LINK HERE";
// End -->
</script>

<noscript>
It appears that your browser does not support JavaScript, or you have it disabled. This site is best viewed with JavaScript enabled.

Paste it in <body> here </body>


 
BadBoyDate: Saturday, 2009 June 06, 1:29 AM | Message # 3
Font size: A | A |
Lieutenant
Group: uCozer
Message: 74
[ ]
Offline
jackass this code doesn't work for me.
i tried to redirect using this code from example.com to www.example.com
and it looks like it just refreshes my website over and over again, it is like pushing F5
is there a way to mod this code to redirect from example.com to www.example.com and stop
idk is there like IF tag that can be used or some ucoz tag that say IF user is on www.example.com then don't redirect IF not ELSE do it.


Edited ByBadBoy - Saturday, 2009 June 06, 9:17 AM
 
jackassDate: Saturday, 2009 June 06, 6:10 PM | Message # 4
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
BadBoy, but why do you need www?
In browsers it redirect automatically and if you are using IE or other browsers than it is recommended that you use FireFox


 
BadBoyDate: Wednesday, 2009 June 10, 4:02 AM | Message # 5
Font size: A | A |
Lieutenant
Group: uCozer
Message: 74
[ ]
Offline
Quote (jackass)
but why do you need www?

because of the search engine, google for example treats www.example.com and example.com as two different websites.
so it treats one website as two different website which makes it duplicate content.

see this link about non-www and www websites
http://www.google.com/support....r=44231

 
jackassDate: Wednesday, 2009 June 10, 10:12 AM | Message # 6
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
For my your link dosn't work

But isn't it good? If your website will be two time more in google?


 
BadBoyDate: Tuesday, 2009 June 16, 0:12 AM | Message # 7
Font size: A | A |
Lieutenant
Group: uCozer
Message: 74
[ ]
Offline
Quote (jackass)
But isn't it good? If your website will be two time more in google?

Search engines consider http://ucozers.ucoz.com/ and http://www.ucozers.ucoz.com/ as different site. So when your pages are accessible with both www and non www url your pages from referrer sites and search engines break into two parts. Thus you get only half benefit from search engines.
If you know how Google works, then you would know that Google promotes websites with highest unique visitors (uv), and if website with www. gets 1200 uv and the same website with non-www gets 2500 uv it treats it as two different website, that means views don't combine to make a 3700 uv.

So to optimize my search enginge referals to maximum i must use either only www or non www urls by redirecting one to another. In most in this case websites redirects non www url to www url.

Is there a way i can put this code at the top of .htaccess file.

Quote
# Non www url to www url
RewriteCond %{HTTP_HOST} !^www.ucozers.ucoz.com
RewriteRule (.*) http://www.ucozers.ucoz.com//$1 [R=301,L]
 
jackassDate: Tuesday, 2009 June 16, 0:37 AM | Message # 8
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
Quote (BadBoy)
# Non www url to www url
RewriteCond %{HTTP_HOST} !^www.ucozers.ucoz.com
RewriteRule (.*) http://www.ucozers.ucoz.com//$1 [R=301,L]

What is it? biggrin
I'm not informed about it


 
BadBoyDate: Tuesday, 2009 June 16, 1:39 AM | Message # 9
Font size: A | A |
Lieutenant
Group: uCozer
Message: 74
[ ]
Offline
http://httpd.apache.org/docs/1.3/howto/htaccess.html
 
jackassDate: Tuesday, 2009 June 16, 9:42 PM | Message # 10
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
BadBoy, I think you can't use it on uCoz site, but I don't know, better is to ask it on official uCoz support forum

 
BadBoyDate: Thursday, 2009 June 25, 1:29 PM | Message # 11
Font size: A | A |
Lieutenant
Group: uCozer
Message: 74
[ ]
Offline
Quote (Hetor)
PS. Remove the stupid capcha.

capcha?
 
LeeDate: Friday, 2009 July 31, 4:05 AM | Message # 12
Font size: A | A |
Private
Group: User
Message: 5
[ ]
Offline
No more discussion is needed due to there being no official way to do this on the uCoz CMS.

 
jackassDate: Saturday, 2009 August 01, 1:28 AM | Message # 13
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
This is old topic!

Locked!


 
uCoz Support Forum by uCozers » uCoz » General Questions » How do I redirect example.com to www.example.com? (sml[Default]How to redirect from non-www to www website?)
  • Page 1 of 1
  • 1
Search:


Copyrights uCozers 2009 - 2024 To TOP
Refresh Smileys Manager