Seeing the site before the domain points here, and the Index of / listing

The account is created, the files are there — and the domain still opens the old site, or opens nothing. That is normal: hours pass between changing nameservers and the whole world knowing about it. But you do not have to sit and wait to start working.

The route that always works: the hosts file

Your computer checks a file of its own before asking DNS. If you tell it the domain is our server, your browser starts seeing the new site — and only yours. Nobody else in the world is affected.

1 Find your account's IP address in cPanel — see what your hosting IP address is and where to find it.
2 On Windows: open Notepad as administrator and open C:\Windows\System32\drivers\etc\hosts. On Mac or Linux: in Terminal, sudo nano /etc/hosts.
3 Add two lines at the end, with your IP and your domain:
123.123.123.123  yourdomain.co.mz
123.123.123.123  www.yourdomain.co.mz
4 Save, close the browser completely and open it again. You now see the new site at the real address.
Delete the lines when you are done. While they are there, only you see the new site — and you will carry on seeing it even after the domain points elsewhere. We have seen people spend days convinced the site was live because of this. Remove both lines as soon as the change is complete.
Why e-mail does not follow. The hosts file only fools your computer, and only for the website. Mail keeps following whatever public DNS says — see how long DNS changes take. To test mailboxes before the switch, use webmail directly.

The site opens and shows «Index of /»

Instead of the site, a list of files and folders appears under the heading «Index of /». It is not an error and not an attack: it means the server went to the folder and found no index file there, so it showed what was in it.

The server looks, in this order, for an index.php, an index.html or an index.htm in the site root. If none exists, this is what happens.

Cause What to do
You have not uploaded the site yet Upload the files to public_html. In the meantime, put a simple index.html there saying «under construction».
You uploaded into a folder The content ended up in public_html/site/. Move it one level up, or make that folder the domain root.
The file has a different name Index.html with a capital I, or home.html, do not count. Rename it to index.html, all lower case.
The index was deleted If the site used to work, something removed it. Restore by date — with JetBackup — and check whether more files are missing.
While it looks like this, your site is on display. The listing shows your folder structure to anyone passing by, and automated scanners love that — it is how they find forgotten backups and files holding passwords. Fix it the same day. If you would rather disable listings for good, create a .htaccess in the root with this line:
Options -Indexes

With that, a folder without an index returns 403 instead of showing its contents — see error 403 Forbidden and website errors: 500, 403, 404 and 508.

A subdomain to work on comfortably

If you are going to build the site at your own pace, create a subdomain — new.yourdomain.co.mz — and work there. It opens immediately, it does not touch the current site, and you can show it to anyone without changing a thing. See parked domains and subdomains.

The domain should be pointing here by now and does not open?

Open a ticket

RECOMMENDED PRODUCT

Register your .co.mz domain

Secure your company name before someone else registers it. from $41.68/yr

Search a domain
  • 0 Users Found This Useful
Was this answer helpful?