SOLVED: Internal links not working properly

So I am kinda new to html and github. I have my github pages website up and running, but when you click on a link in the nav bar, it shows a 404 error because the link repeats itself. Example: Normal url upon loading up the site is example.github.io/example.html/. When you click on a link in the nav bar it goes to example.github.io/example.html/example.html, and that shows a 404 error. 

Link to main repository --> https://github.com/ninetailedmachine/ninetailedmachine.github.io

EDIT: I’ve solved the problem

@ninetailedmachine Thanks for the update! Would you mind sharing your solution?

1 Like

I had made separate repositories instead of making a folder inside of the main repository. So I made a folder in the main repo, changed the html a bit to follow that path, deleted the other repositories and it worked! Obviously, I’m new to github, so this took me longer to figure out.

2 Likes

@ninetailedmachineThanks a bunch for coming back to share! We’re looking forward to seeing you around!

2 Likes

You can also use JS in the end to force it to go to that link.

<a href=“example.html” onclick=“window.open(‘example.html’, ‘_self’);”>

  Example

</a>

2 Likes

Hi How do you solve the problem can you tell me some details.

do i have to create a forlder within repo and upload files into that folder?

My Repo-> https://github.com/mzaifquraishi/mzaifquraishi.github.io 

Your website looks great so far!

GitHub Links don’t work unless forced via JS.

<a href="example.html" onclick="window.open('example.html', '_self');">

  Example

</a>

Change example.html to your page and change the Example text to your link text.

1 Like

thanks that is exacatly what i was looking for.

How could I use your example above and apply it to this? : 

<a href=“Services.html”>Services</a>