My Jekyll website is hosted on a remote webserver under a domain. I deploy through secure copying the build folder into the webserver which then automatically renders the website. It runs well locally with no problems when I execute jekyll serve, however, when deployed on the webserver, it renders the website but it pulls a 404 error on the navbar links with the url of the website appending on each other twice. I have removed my url from my _config.yml file, and only added the baseurl of “/”, so no mentions of the webserver domain at all. However, it still appends the url twice and can only pull up the index.html of the homepage, but not much of the other pages on the website.
For example, entering website.com can pull up website.com/#/ which is the homepage I believe. But when I go to click on the links in the navbar of my website, it pulls a 404 error and the address is now website.com/website.com//[page title here]. It appends twice and adds a backslash twice as well. I’m thinking it has something to do with absolute and relative links. Most of the pages and layouts for the site are in HTML. I’m wondering if I have to hardcode the links into the navbars for this to work properly. Else I don’t know why or how it’s appending the two urls twice together.
One thing to note though, is that when I run the address with just a backslash and the title of my page, it pulls up the page well. So the problem lies in the url appending twice. For instance, when running www.website.com/[page title here], it renders the page no problem.
UPDATE: I removed my url: tag from _config.yml which did the trick. However, when I run the website again, it pulls a ‘This Site Can’t Be Reached’ error, and weirdest part is, the url doesn’t even show fully, it is just one word with no link wrapped around it. So when I click on ‘members’ in the navbar, it takes 5 seconds and then it pulls up ‘This Site Can’t Be Reached’ with a url like ‘members’. No .org, no www, just the keyword from the title of posts and pages on the site.