When we make HTML pages, we generally save it with a .htm or .html extension. But most webpages on the internet have extensions like .com or .org, for example, https://example.com. How do these pages work?

  • .org in en.wikipedia.org is NOT an extension, please do not use this term, even if widely used. It is one of the label of the domain name, and since it is at the extreme right and since DNS is right to left writing basically, it is called the Top Level Domain or TLD for short. – Patrick Mevzek Aug 20 at 14:27
  • On the web, filename extensions should not matter, if things are properly done. See "What to leave out" in w3.org/Provider/Style/URI (but the whole document is a very good read) – Patrick Mevzek Aug 20 at 14:29

There are several ways to achieve this:

  1. Create an index.html inside root folder of your hosting and open your domain ie. http://example.com, you can see the output from index.html on http://example.com

  2. You can tell your server using .htaccess to display the desired file when someone opens your domain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.