Help Desk

Broken Links

There are many reasons why your links can be broken here are a few things you can check

Path Name incorrect

  1. If all you files are in the same folder (not really a good idea) your links should look like

<a href="index.html">Home</a>

<img src="cat.png">

  1. If you have images in a sub folder called images your links should contain the path name and look like

<img src="images/cat.png">

Note there are no folder instructions like "/" or "./" in front of the images folder (you should NEVER have "/images/cat.png" as this tells the browser to look at the root folder of the drive).

Make sure you are using Relative addressing not Absolute

  1. Make sure NONE of the links have a drive letter in front (e.g.,
    In the code if there is an absolute file link e.g. C:\\mywebsite\index.html” this would mean I need access to your computer’s C drive. I should NEVER see a drive letter in your code.

Examples:
<a href="C:/index.html">Home</a>

<img src="C:/images/cat.png">

Should be

<a href="index.html">Home</a>

<img src="images/cat.png">

  1. If you have “/filename.html” this says that the file is in the root folder of the drive (common if you have been using neocities), so won’t work on my computer. Remove the /. When copying files from Neocities make sure that the path names are correct as I had one student submit with all their src’s pointing to “/..” the root folder of the drive

  2. Creating sites in neocities may create “absolute links”. This often happens in tools when the page has not been saved BEFORE the links are added. Please check through the code for two specific things that have shown up.

    1. The stylesheet or hyperlinks do not contain a “/” or “./” in the path“<link href="/stylesheet.css" rel="stylesheet" type="text/css"> or,“<link href="./files/stylesheet.css" rel="stylesheet" type="text/css">should be“<link href="stylesheet.css" rel="stylesheet" type="text/css">. OR for a hyperlink<a href="/index.html">Home</a>, should be<a href="index.html">Home</a>If you have “/filename.html” this says that the file is in the root folder of the drive (common if you have been using neocities), so won’t work on my computer. Remove the /.

    2. Check that any of the hyperlinks don’t have a neocities part like<a href="https://mysite.neocities.org/index.html">Home</a>, should be<a href=" index.html">Home</a>

Have files in a folder "above" the one where your HTML files are saved

  1. A reference to a file above the .html file’s folder. Depending on how you create your folder structure if I see <img src=”/myimage.png”> this means the image is in the root folder of the drive so very likely is not going to be included in the zip archive.
    Also watch for the “../” e.g. <img src=”../myimage.png”> which says get the image in the folder above the one for the .html file.

If you have used an HTML editor.

Editors like Adobe's Dreamweaver or Visual Studio/SharePoint HTML editor (Used to be called Expression Web) make sure you save the HTML file BEFORE adding any assets (CSS file, images, etc.) otherwise it will create absolute links to the asset (e.g., C:/MyDrive/images/cat.png).

Are Filenames exactly as they are saved on the drive

Is the name of the file in your HTML code EXACTLY the same as the filename in the folder e.g., if you have "cat.png" in the HTML file it must be cat.png in the folder not Cat.png, cat.PNG, CAT.PNG etc.) this is because Neocities is hosted on a Linux server and case matters. Also note that you may need to close the page and reopen for the image to reappear as I noticed that a forced refresh ([Shift]+[Refresh]) didn't work)

Corrupt files

Just in case there are issues with the file, upload a different image and change the img src to the new image name and try again.