How do I - Point a domain name to a folder? (2nd attempt)

Hi.
Thanks in advance for taking the time to read this and for helping out.
I built a website about 25 years ago, when it was possible to get free hosting without adverts.
I still have that website, but hardly touched it in the past 20 years.
Recently, I made a mini-site & put it in a folder of the main website.
Yesterday I bought a domain name from hostinger, which I want to point to that folder (i.e the folder’s index page).
More Details:
The host was originally freeserve, but is apparently now hosted by Plusnet, and it’s still hosted free of charge.
I already have a domain name pointing to the main index page, which I pay easily.uk for, and I don’t want to screw things up by being incompetent.
After reading tutorials, such as “How to Point a Domain Name to Your Site”, I get the impression that they’re teaching me how to point the new domain name to the index page of the main website.
I actually want it to point to the index page of the folder
i.e. http://www.newdomain.com should point to http://www.existing.com/folder
or http://www.existing.com/folder/index.html
Can anyone tell me how to do that with a domain name from hosinger?
Thanks again.
P.S. Apparently I have to include my 000WEBHOSTAPP URL (which is irrelevant), but let the record show that my mini-site/folder contains https://nowt.000webhostapp.com/list.php?

N.B.
I posted this same question a while ago, but the answer that I got
(“You could add something like this to your .htaccess file DirectoryIndex /folder/index.html”)
was no help, as I don’t even know what htaccess files are. (I’m a Dummy. I know nothing about domain names & web hosting etc.)
I’m looking for an answer for Dummies
e.g. Go to page: https://www.[whatever it is] & change [something] to http://www.yourwebsite/thisfolder

I tried what I thought the answer meant:
Under [Domain Management], I tried to change “ns1.dns-parking.com” to http://www.yourwebsite/thisfolder
… but I got the error:
“Error occurred while updating nameservers. {ns1=NameServer http://www.yourwebsite/thisfolder should be in proper format}”

I also tried changing “ns1.dns-parking.com” to “212.159. 6.9”, and “ns2.dns-parking.com” to “212.159. 6.10” (which is what Google tells me that the Plusnet DNS Servers are)
Same error.

Can anyone provide an answer-for-dummies please?

@nowt

Firstly, Update 000webhost nameservers on your domain dns(Domain registrar) and park/link your domain in your 000webhost account.
Nameservers are:
ns01.000webhost.com
ns02.000webhost.com
(Ignore this, if you’ve alrerady finished this step)

Now to redirect user to subfolder when you load domain.com, Follow below steps:

  1. Login to your 000webhost acount.
  2. Open File Manager
  3. Go to “Public_html” (Ignore if you’re already in this folder).
  4. Now create a new file and name it as .htaccess .
  5. Now edit .htaccess and add below lines.
RedirectMatch ^/$ /subfolder/

*Replace subfolder name with your actual subfolder name.
  1. Now hit “Save and close”.
  2. Now when any user tried to load yourdomain.com then user will be automatically redirected to yourdomain.com/subfolder/.

Hope this helps you. :slight_smile:
Let me know if i’m missing anything.

Thanks for taking the time to help, akhilkumar332.

I’m not able to do what you described, probably because I bought the domain from Hostinger rather than 000webhost.
With that, there is no “File Managr” section, that I can see.

I really appreciate you taking the time to help me, but I think the only option available to me is to tranfer the domain name to a better domain-sevice-provider.

@nowt Seems you got confused, Let me re-describe it for you :slight_smile:
First update 000webhost nameservers on your domain dns:

  1. Login to your hostinger account and go to Domains Section >> Domain Management
  2. Scroll down a bit and go to Update Nameservers and update these:
    ns01.000webhost.com
    ns02.000webhost.com

As you’ve updated 000webhost ns on your domain dns, Now it’s time to link domain with the hosting and apply redirect rule

  1. Login to your 000webhost acount.
  2. Go to Manage Website >> Tools >> Set Web Address and Park your domain(This step will cover your new domain linking with the hosting).
  3. Now Open File Manager available in your 000webhost account under Tools >> File Manager.
  4. Go to “Public_html” (Ignore if you’re already in this folder).
  5. Now create a new file and name it as .htaccess .
  6. Now edit .htaccess and add below line.
     RedirectMatch ^/$ /subfolder/
    
    *Replace subfolder name with your actual subfolder name.
    
  7. Now hit “Save and close”.
  8. Now when any user tried to load yourdomain.com then user will be automatically redirected to yourdomain.com/subfolder/.
    .

Hope you’re clear now,let me know if you still have any doubts :slight_smile: