Use a new domain in the place of the old one

Hello,
I just deleted all the files of the website lenke.000webhostapp.com and I want to use this space for another website with a new (free) domain name. In other words, I want to replace the domain name ‘lenke.000webhostapp.com’ with another one. How can I do this?
Thank you for help.

@monicalaura So you want to use a custom domain name instead of ‘lenke.000webhostapp.com’,
If this is what you’re asking,
Then first update 000webhost nameservers on your domain dns.
Nameservers:-
ns01.000webhost.com
ns02.000webhost.com

Then Login to your 000webhost account, Go to “Set Web Address” – “Add Domain” – “Park Domain” and link it with your desired website.

*Note:- You can’t get rid of .000webhostapp.com url, as it is common for every user to instantly go online.

Hello, I am not sure how I can update the nameservers. I want to take a free subdomain for my website, which must be shown in the URL bar as the site’s adress. For ex, like in this capture, I want to upload the site ‘biowave’ in the place of ‘lenke’, and I want to replace the url of ‘lenke’ with the one for ‘biowave’. I got a free subdomain, but from here on, I am a bit lost here, in the procedure. Isn’t there any way to make appear in the url bar the free subdomain ‘bio-wave.comeze.com’? Thanks.

Hi @monica!

So, to clarify, you want your visitors to browse lenke.000webhostapp.com and redirect them to bio-wave.comeze.com, or the opposite of this?

Or something else? :slight_smile:

No, I don’t want this domain lenke.000webhostapp.com, but instead of it, I’d like to have the website bio-wave.comeze.com, with its own domain name.
In other words, on 000webhost we are limited to only 2 websites free. As I moved the site lenke.000webhostapp.com to Hostinger, I would like to use its space for another website :slight_smile:

You mean that you moved lenke.000webhostapp.com to a premium account and that you want to make a website instead of lenke.000webhostapp.com ?

@monicalaura [quote=“monicalaura, post:6, topic:70635”]
lenke.000webhostapp.com
[/quote]
If you don’t want this url then don’t use it publically.

Else use http rewrite rule(so that whenever one tries to load “lenke.000webhostapp.com” then it will be redirected to “bio-wave.comeze.com”.)
Paste below script exactly in your .htaccess.

RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTPS_HOST} ^https://lenke.000webhostapp.com [OR]
RewriteCond %{HTTP_HOST} ^lenke.000webhostapp.com$ [NC]
RewriteRule ^(.*)$ http://bio-wave.comeze.com$1 [R=301,L]

Actually , I want that people find the bio-wave.comeze.com when they type ‘bio-wave’, so completely replace the old website with the new one. I only want to use this free space for a simple static website, that’s all.

Actually, that’s what @akhilkumar332 said

Exactly. I want to use this space for another website.

Actually , I want that people find the bio-wave.comeze.com when they type ‘bio-wave’, so completely replace the old website with the new one. I only want to use this free space for a simple static website, that’s all.

You mean that https://lenke.000webhostapp.com/hello.php be replaced with bio-wave.comeze.com/hello.php ?
If so, give me a second…

Yes, that’s what I want. Only to use the space of the old site for a new one.

Try this
RewriteEngine On
RewriteCond %{HTTP_HOST} ^http://lenke.000webhostapp.com
RewriteRule ^(.*) http://bio-wave.comeze.com/$1 [P]

Thank you for the information.
When I upload the new website with this .htaccess file, it gives me the following error:
"Application error,. An error occurred in the website and your page could not be displayed. If you are the website owner, check your logs for details.“
If I remove the .htaccess, it loads well. Nevertheless, I’d like to have the ‘bio-wave’ url adress instead of the old one 'lenke”. Which might be the error in the url rewriting?

Try

Redirect 301 / http://bio-wave.comeze.com/

Now I have another error. In Chrome I get this message "This page isn’t working

bio-wave.comeze.com redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS"

I tried in Firefox and I get this: "The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept cookies.

I cleared the cookies and website data, but still the same error.

Did you get that error after adding the code that @ckhawand suggested in the last reply?

That could be the issue, try removing at again and see if the error persists. I’m still a bit confused as to why you cannot just not use the 000webhostapp URL. As long as their are no links to it in your website files, no one will ever have to know it exists.

The error persists. Actually, all I want is to have the name ‘bio-wave’ included in the URL address instead of the old one ‘lenke’. I just want to use the space of the old website and have an URL address containing the name “bio-wave” in it. Do you think there might be any possibility to get this? Something like “bio-wave.000webhostapp.com”, for example?

Ohhhhh. Okay. Delete your .htaccess file completely and it should solve the issue. bio-wave.000webhostapp.com is available, so you can actually do that. You can create a new account, register that site, and backup and move the site from one to the other.