My main page banner-slider keeps adding www.bordnerinstall.com/kansas-city to the beginning of my links, causing 404 errors. How can i get it to stop? Which line of code is causing this? see www.bordnerinstall.com to see it live.
I tried to post the code here but it wouldn’t show the actual code. The first slider, free insulation is the one I’m referring to.
When you inspect the element on that link, the href is
you just need to remove it so that it will be just /free-insulation-offer
It is not showing that in the code while in percussion. In fact my Colorado main page is doing the same thing, it is appending www.bordnerinstall.com/colorado-springs to the front of my link causing it not to work. I believe something in the code is telling it to append the URL link. I just don’t know enough about coding to be able to discern which line it could be.
I would just change the link to /free-insulation-offer but it still wouldn’t work since it is also appending Kansas-city to the front of the link.
To add some clarity here, an href of “www.bordnerinstall.com/free-insulatio…” will actually be regarded as a relative link because it doesn’t begin with http://, and therefor be appended to the browser’s current URL.
E.g. When browsing from “http://www.bordnerinstall.com”, a link of “www.bordnerinstall.com/free-insulatio…” will lead to http://www.bordnerinstall.com/www.bordnerinstall.com/free-insulatio…"
In this case you’re linking to a page on the same domain, so there’s no need to include the domain in your href. A good refresher on linking logic in HTML can be found here: http://www.coffeecup.com/help/article…
Just saw your reply. Following that same logic, that same relative href from http://www.bordnerinstall.com/colorado-springs will append your relative link to that full base URL.
E.g. if you’re already on http://www.bordnerinstall.com/colorado-springs, an href of:
www.bordnerinstall.com/free-insulation-offer will lead to:
Similarly, a relative href of “free-insulation-offer” will lead to:
http://www.bordnerinstall.com/colorado-springs/free-insulation-offer, which will still 404.
What you need is a root relative link, “/free-insulation-offer” (note the leading forward-slash), which will always append the link to the site’s root domain, regardless of where the visitor is on your site:
That fixed it. Thanks again Nathaniel! I tried it without the http://www.bordnerinstall.com/ in front of the link but I still didn’t have the / in front of it. Once I added that it worked perfectly!