|
|
|
#1
|
||||
|
||||
|
hey everyone how do i resolve non-preferred hostname on my website. I use 1 and 1 webhosting. any help is appreciated!
__________________
There's no place like 127.0.0.1 C:\WINDOWS C:\WINDOWS\GO C:\PC\CRAWL Nibbler for life |
|
#2
|
||||
|
||||
|
Hey, I'm going to assume you're using Apache. (If not, don't attempt this!)
To get rid of the non www (non preferred) all you need to do is a 301 redirect. Ftp into your site, then in the public_html folder, look for .htaccess If there isn't one already, make one. Inside, copy and paste this in: Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yoursite.com
RewriteRule (.*) http://www.yoursite/$1 [R=301,L]
Make sure you change the "yoursite" to your domain. Then save it, and you're all done ![]() Now when someone visits http://yoursite.com they will automatically be taken to http://www.yoursite.com |
|
#3
|
||||
|
||||
|
thanks got it to work! Really appreciated it!
__________________
There's no place like 127.0.0.1 C:\WINDOWS C:\WINDOWS\GO C:\PC\CRAWL Nibbler for life |
![]() |
| Thread Tools | |
| Display Modes | |
|
|