Anchor tag working locally, but not when deployed

785 Views Asked by At

Weird problem I'm running into... This anchor tag <a target='_blank' href='jresume.pdf'>Resume</a> is working fine locally. Opens a new page and loads my pdf file. But for some reason when I deploy my site to surge.sh the link no longer works and gives me this error "No webpage was found for the web address: http://sitename.surge.sh/jresume.pdf" if anyone could help that'd be great. Thanks

1

There are 1 best solutions below

0
sveinnthorarins On

The first step I would take is to make sure the file is in the right place on your web server (have you actually uploaded the file to your web server?). I guess that'd be in the same folder as your index.html or the same folder as whatever html file is linking to it.

If that's not the problem I'd try changing href='jresume.pdf' to href='./jresume.pdf' and seeing if it makes a difference.