Go Back   Technibble Forums > Advertising & Marketing > Website Development & SEO

  Technibble Sponsor

Reply
 
Thread Tools Display Modes
  #1  
Old 07-27-2011, 03:00 PM
Rosco's Avatar
Rosco Rosco is offline
 
Join Date: Jul 2011
Location: Massachusetts, USA
Posts: 1,833
Rosco is on a distinguished road
Default Redirecting requests

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
Reply With Quote
  #2  
Old 07-27-2011, 08:24 PM
Craven_Morehead's Avatar
Craven_Morehead Craven_Morehead is offline
 
Join Date: Jul 2011
Location: Southern California
Posts: 55
Craven_Morehead is an unknown quantity at this point
Default

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
Reply With Quote
  #3  
Old 07-28-2011, 01:19 AM
Rosco's Avatar
Rosco Rosco is offline
 
Join Date: Jul 2011
Location: Massachusetts, USA
Posts: 1,833
Rosco is on a distinguished road
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:42 PM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Technibble.com is based out of MELBOURNE, AUSTRALIA.