Direct path to media library images is returning 404

Tim Bush asked on November 3, 2025 14:16

Hi, I'm looking for some help with the media library/files.

The current structure of our site is this; we have two separate sites setup in IIS, one for the live site and one for the admin site. They are both under separate domains. There are two media library directories, one in the admin cms directory and one in the live site; "oursite/media/". We're running Kentico v13.0.142.

I have just finished migrating our sites to a new server (the old server is being sunset.) Once we migrated to the new server, I changed the domain names of our live site. Previously it was "stage.live.mysite.com", now it's "stage.mysite.com". The admin site domain stayed the same. I obviously updated the presentation URL in "Sites".

I've now noticed that the existing images in the media library can be accessed via the permanent link, but when I try to access any image via the direct path, I get a 404. This also applies if I upload a brand new image.

We have automatic web farms enabled and I noticed the old server was showing up in there with "not responding", but this new server cannot connect to the old server, so I deleted the old server from the list.

Any ideas on how to get the direct paths working again would be much appreciated.

Recent Answers


Brenden Kehren answered on November 3, 2025 14:51

Follow up questions:

  1. Are you using permanent URLs on your site? Meaning when an image is inserted into a field or WYSIWYG editor, the URL does it start with /getmedia/... or does it start with /oursite/media/...?

  2. When you view the source of your page, are the urls relative or absolute?

  3. Did you copy files over in BOTH the CMS and the MVC sites? The web farm sync won't sync the files unless something in the CMS triggers them to sync. So if you didn't copy the file structure over to both locations, then this is most likely your problem.

  4. It's ok to delete that unresponsive web farm server, it won't hurt anything.

0 votesVote for this answer Mark as a Correct answer

Tim Bush answered on November 3, 2025 15:11

  1. Yes, we are using permanent URLs. When we insert them they start with /getmedia/....

  2. They are relative.

  3. Yes, I copied both over at the same time. They both have the relevant media files and when I upload a new media file, it's placed in both the CMS and MVC directories.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.