With out WWW it pounts to 000webhosting comercial


#1

Hello,

I have finally setup a web address, but now i have a problem. When i type my address without WWW its goes to my website, but when i type with WWW it goes to a http://error404.000webhost.com/? where the 000webhosting commercial is. I prefer not to see the 404 error page when i type my domain name with WWW. Is that possible?


#2

What is your website and who is your domain registrar?


#3

My website is intergeo.rs and my domain registrant is nic.rs the national registrant of domain names in Serbia.

So far i have created a subdomain “www” and it is now: www.intergeo.rs
And ih public_html folder i have created a folder “www” and put a .htaccess file in side with the content:

Redirect 301 / http://intergeo.rs/

For now it doesn’t work… am i doing something wrong ? When you type in the address bar “www.intergeo.rs” it goes to “*http://error404.000webhost.com/


#4

Login to 000webhost account

go to SET WEB ADDRESS

come down

click on manage —> link website

it should look like this

This should work


#5

if above one does not

Try this

create .htaccess file
and include these

RewriteEngine on
RewriteOptions inherit

RewriteCond %{HTTP_HOST} ^intergeo.rs$ [NC]
RewriteRule ^(.*)$ http://www.intergeo.rs$1 [R=301,L]


now save and upload it on your server

note file format should be .htaccess like below

this will definitely work


#6

so far it does not…
Where did you put your .htaccess file?

mine is: /public_html/www/.htaccess

and off course the subdomain is “www”


#7

it should be in public_html

not in sub folders


#8