I have used my own domain and But the problem is that now my website is live on two different urls, one is my own domain name and the other is 000webhost sub domain which is a problem for seo of my website


#1

I have used my own domain and But the problem is that now my website is live on two different urls, one is my own domain name and the other is 000webhost sub domain which is a problem for seo of my website. For example, How can I disable the 000webhost subdomain. Any help is appreciated.


#2

Don’t give out the 000webhostapp, configuration of scripts to your new domain and if necessary then use .htaccess rules.


#3

Can You help where can I find the .htaccess file. And also can you tell what to write in the file ?


#4

Open public_html and you should see .htaccess

What is your personal new domain ?


#6

RewriteEngine on
RewriteCond %{HTTP_HOST} ^YOURAPP.000webhostapp.com[NC]
RewriteRule ^(.*)$ http://YOURDOMAIN.COM/$1 [L,R=301,NC]

I THINK MIGHT WORK.
:grin:


#7

Can you tell me what is this code actually doing /…? That might also help!!!


#8

If people visit your 000webhostapp by some weird way it’ll bump them onto your domain.

RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_HOST} ^YOURAPP.000webhostapp.com [OR]
RewriteCond %{HTTPS_HOST} ^https://YOURAPP.000webhostapp.com [OR]
RewriteCond %{HTTP_HOST} ^YOURDOMAIN.COM $ [NC]
RewriteRule ^(.*)$ http://YOUR DOMAIN.COM $1 [R=301,L] op

You cannot turn off the application URL on freeium.


#9

Ok Thanks for your help. Now I can decide what to do next…:slight_smile: