Search code examples
htmlcsswebweb-deployment-project

How do I link my website pages using my domain?


I'm building a website and I plan on buying a domain. After purchasing the domain, do I need to change the links in the nav to fit the domain? For example:

Changing: <li class="items"><a class="active" href="index.html">Home</a></li>

To: <li class="items"><a class="active" href="www.mywebsite.com/index.html">Home</a></li>

Is this how it would be done? Or once the html files are uploaded to the hosting site, do I just leave them as 'index.html'?


Solution

  • You can just leave them as index.html and it would work once uploaded same as it works on your computer.

    However, if you have web pages inside folders, and to go back you need to use ../index.html. Once you host your website you could either use ../index.html or more preferably http://www.mywebsite.com/index.html