How to show my domain URLs only?


#1

I parked my domain name at 000webhost. How can I get visitors to see my domain name only? In other words, I don’t want my website directed to 000webhost. Thanks


#2

You have to add this code to your .htaccess file

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.net/$1 [L,R=301,NC]

Replace example.com with your old domain, and http://example.net with your new domain.


#4

Your code did not work.


#5

Did you replace the example.com ?


#6

Yes, I did replace the URL with my own.


#7

After adding that piece of code you then need to clear you browser cache and data to see some action. :slight_smile:
Else you can use “Private or Incognito” mode in browser to test.