Search code examples
htmlherokuhyperlinkgithub-pages

<a href> automatically adding www to site url by GIthub


I have linked a project I made on heroku to another application made as a Github Page. My code is as follows:

<a href="http://msitproject.herokuapp.com">Project</a>

When I click on the link Github automatically prefixes it with www. But my application on heroku cannot be accessed by adding "www" as prefix. That is,

msitproject.herokuapp.com [works]

www.msitproject.herokuapp.com [doesn't work]

How can I prevent Github from adding "www"


Solution

  • Looking in your index.html code, I found this :

    <a href="msitproject.heroku.com"><h4 class="project-name">Bulletin App</h4></a>
    

    It is supposed to be this :

    <a href="http://msitproject.heroku.com"><h4 class="project-name">Bulletin App</h4></a>