Domain displayed without www.

ashley777

Junior Member
Joined
Aug 30, 2010
Messages
144
Reaction score
18
Hello,

I have a very big problem. I setup a server, bought a domain from a different source and everything is running so far.
But whenever I want to open w*w.testpage.c*om it just opens testpage.c*m :confused: Someone told me I have to modify .htaccess - but where and how?
I did google search but could'nt find anything.
Thanks in advance.

Best regards:)
 
Ask your web host to redirect the non www url to the www url.

maybe you cannot access .htaccess.
 
I can access .htaccess - but it is very weird.
When I do backlinks now should I use the www. or not?
 
Here you go :

http://www.blackhatworld.com/blackhat-seo/white-hat-seo/258855-redirection-301-htaccess-tutorial.html
 
Create a text file called htaccess.txt and put this inside it...
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.yourdomain.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]

Then upload it to the root of your hosting.

After uploading rename it to .htaccess

Note the . at the beginning and no extention, it MUST be called .htaccess

**Edit**
I see you can access your file so just edit it to include that code...
Once you include that code your page will open as www. and backlinks should reflect this.
 
Last edited:
Use the non www url for BACKLINKING , which is showing right now.


and if you access to .htaccess

add this code

Code:
RewriteEngine on 
RewriteCond %{htTP_HOST} ^example\.com 
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

replace example with your site.

to make the site go to w*w.testpage.c*m
 
Last edited:
Man I thank you all so much - its great to be here.

So can I leave it like this:

RewriteEngine off
<IfModule mod_suphp.c>
<Files php.ini>
order allow,deny
deny from all
</Files>
Options All -Indexes
</IfModule>

RewriteEngine on
RewriteCond %{htTP_HOST} ^testname\.com
RewriteRule (.*) http://www.testname.com/$1 [R=301,L]
 
No, then its going to http://site.com as well.

Then the redirect code you are using is wrong. Try the one I posted if you want it to redirect to the www. version.

Although I don't know how your server will handle the fact that you have both rewrite on and off.
Someone else will have to work that one out if it still doesn't work.
 
Is your site running wordpress? If so everyone is giving you the complicated way, you can chance it in your general settings. If you are not using wordpress then you can go the .htaccess route.
 
Is your site running wordpress? If so everyone is giving you the complicated way, you can chance it in your general settings. If you are not using wordpress then you can go the .htaccess route.

This one site is running WP, yes. But I want other blogs and pages there as well.
 
If running Wordpress then just click General, then settings. Once you get there change WordPress address (URL) and Site address (URL). Put a www. in front of the domain name and you should be good to go. However, I have noticed if you don't do this from the very start that it can cause some weird indexing issues that don't seem to straighten out for a while.
 
Yes this is the correct solution. I assume you already changed htaccess like above com mentors said.


If running Wordpress then just click General, then settings. Once you get there change WordPress address (URL) and Site address (URL). Put a www. in front of the domain name and you should be good to go. However, I have noticed if you don't do this from the very start that it can cause some weird indexing issues that don't seem to straighten out for a while.
 
Let's be fair now, the original post said he set up a server and was told he needed to edit .htaccess ... He got instruction to do just that. Any mention of Wordpress would have brought different instructions ;-)

Anyway, done now and he did say that there would be other platforms being used as well so he's gonna need to know how to do it manually anyway :)
 
If running Wordpress then just click General, then settings. Once you get there change WordPress address (URL) and Site address (URL). Put a www. in front of the domain name and you should be good to go. However, I have noticed if you don't do this from the very start that it can cause some weird indexing issues that don't seem to straighten out for a while.

100% - did it - working now perfect !!!

BHW is just awesome - thanks to all of your for this not normal super fast support !!! :pirate:
 
Back
Top