Two years, no problems, then today I'm seeing 404's on my site's files

Hello there,

I’ve been storing files relating to my website in a GitHub repository for well over two years (since Oct-2018) - just small stuff like javascripts and stylesheets - solely because GitHub’s servers are a lot faster at loading them than my webhost.

Everything’s been working fine for the entire time the files have been on GitHub. Then quite out of the blue since a few hours ago, the GitHub files are no longer being loaded for the webpages that use them, and as a result the layout etc of the website is all messed up.

I checked GitHub Status, and it indicated there had been some problems, but they’ve apparently now been resolved, yet my webpage layouts are still broke. And if I click on any of the hardcoded links to GitHub for accessing those files, I get 404 errors.

The website’s codebase hasn’t been touched, and if I point webpages at the local versions of the files, everything’s fine again. So it looks like something has changed at GitHub’s end that I don’t know about … does anyone know what that might be …?

OK then,

Well, I’ve found the source of the problem … the path to my files has changed, from:

ht tps://
ht tps://

I must admit I never really understood why the original had to have the path ‘restated’ the way it did, but as that was what the documentation said to do at the the time, and as it was the only way it would work, that’s what I went with.

Now after two years the original path is invalid all of a sudden and the more conventional pathing is the one I need to use.

Trouble is, to fix it on my site I’d have to initiate rewrites of 8000 album pages and 2000 artist pages, which I’d prefer to avoid.

Sorry, but I’m not familiar with all the ins and outs of GitHub, so my next question is … is there a ‘dirty’ fix …?

I tried renaming the repository to conform to the original pathing, but instead of a slash the rename used a dash …

ht tps://
instead of
ht tps://

… and that didn’t fix the site anyway, as it’s coded to expect a slash.

Anyone know if there’s a way to adjust the new pathing to match the original …?
Or a way to copy the repository into a subfolder with a path of
ht tps:// (using a slash) …?


NOTE: The spaces in the folder names below are only intended to bypass the 2-link limit imposed on my posts

After much rummaging about, I figured out how to create a subfolder called …

alltimerecords .github .io /

in my master folder alltimerecords .github .io, with the resulting path name

alltimerecords .github .io / alltimerecords .github .io /

which is what my website expects to find.

Then as I couldn’t find a way to copy all the files from the master folder to the subfolder within GitHub itself, I downloaded them as a zip file, unzipped them, then uploaded them again into the subfolder, and pressed [COMMIT].

But whilst I can now see all the files set up in the subfolder, my site still can’t see them … instead it continues to come back with a 404.

So now I’m completely stumped, and run out of ideas.

Maybe I have to wait a few hours for the new folder to go ‘live’ …?


Just noticed a more precise explanation for the problem …

When I ‘Inspect source’ of a webpage and click on a link to GitHub that (for example) says :

ht tps://

… instead of the full path, the 404 error page is only pointing to ht tps://

but then - if I manually add /album.css to that address - it finds the file OK.

So it looks like there’s been some sort of redirect set up in GitHub that wasn’t there before today, that’s now causing my site to not find the files it’s looking for.

Does anyone know if that’s the case, and if so, whether there’s a fix to prevent the redirect …?


Well, it seems that starting threads on GitHub Forums during Easter may be a bad idea …

Whilst it’s certainly the case that this issue has been triggered by some change at GitHub - one that seems unlikely to be identified, let alone be fixed - in order to get my site repaired in a timely manner, I’ve spent my Easter implementing a fix, one that unfortunately required a rewrite of all 10,000-odd pages.

I’m just recording the details here so I can create a scrolling screengrab of this thread to add to site documentation …

[1] Instead of having webpage links to the site’s GitHub repository hardcoded, pages now dynamically acquire the link from a Global variable. So if a pathing problem arises in the future, it can be fixed in a few seconds (rather than taking three days), simply by changing the value of that variable.

[2] Similarly - to prevent being exposed to GitHub outages / broken pathing in future - a Global variable has been created that instantly toggles the site from reading GitHub resources to Local resources on the webhost.

OK then,
All The Best!

nope, you are confused, the repo that you are hosting is the culprit,

in order for you to have, your repo should be

what happened was that your repo is

so you can easily fix this by creating a new repo named on GitHub and upload all the content of your site there and preserve the folder system and you are done

OK, thanks xdvrx1 …

As I stated in the thread, the path I’d set up originally (the last one in your post) had worked flawlessly for well over two years - not even the slightest of problems there. Then right out of the blue it broke. And as I didn’t do anything to cause that, and everything still looked the same as it always had for the preceding two-plus years, something must’ve changed at GitHub … otherwise, why did it work for well over two years, then just stop working.

Still, no matter - it’s all sorted now - as I’d already changed the pathing to the one you recommended.

OK then,
All The Best!

1 Like