Forum

Thread tagged as: Question, Problem

Replace resource PDF files (without the filename changing) for SEO

Hi,

So this is maybe a bit of a niche issue/request, but I'll go ahead:

There doesn't seem to be a way to replace a file (e.g. a PDF) without the filename being different (i.e. it's a new file). For the most part, I am fine with this, as that way we can keep hold of older versions.

But, this becomes a problem for PDFs indexed by Google, in the following example:

  • My client posts a link to their "Terms of Business" PDF (Version 1) on a page.
  • Google indexes this file (as it should) and lists "/terms_of_business_v1.pdf" on Google.
  • My client comes to update the file (via the CMS), uploading the file "terms_of_business_v2.pdf"
  • Now, Google may index the new file, and may show it in results, but will continue to show "/terms_of_business_v1.pdf" even though it's outdated
  • A user has no way of knowing that the "/terms_of_business_v1.pdf" link isn't the most up to date

Now, we can manually delete old PDF files and ask that Google remove them from their index, but this is really impractical and an annoying manual process for clients. It would therefore be better, in this case, to simply have a "/terms_of_business.pdf" file (can be dated/versions in its content) which can be updated/replaced.

Hope this makes sense. I was wondering if you can make any recommendations around this issue or let me know if there is any CMS way to update a file and not its name (I can't find any automatic Google based solution for version control of files with different names) .

I had assumed that changing the "file" field and uploading a file with the same name would do this, but it insists on appending existing file names instead of overwriting.

Matthew Lymer

Matthew Lymer 1 points

  • 1 week ago
Drew McLellan

Drew McLellan 2617 points
Perch Support

There's not currently a way to do this with Perch directly.

Hi Drew,

That's what I thought. What about if I delete an asset (e.g. "terms_of_business.pdf") from the library then upload another with the same name - will it still append it the name? I suppose it if the duplicate checking is done against existing files or names of previously existing files in the database.

Drew McLellan

Drew McLellan 2617 points
Perch Support

The name is only changed if a file with the same name exists. This is so we can enable you to undo changes (with the Undo button) and also so that CDNs don't cache the old file.

We're actively looking into a solution to enable replacement if you want it, but not replacing a file with a different one of the same name is so deeply engrained as good practise that it's not simple to unpick!

Ah well it's good to hear you're looking into that! I totally get the reason for not overwriting - my only need is to appease search engines.

From what you have said though, a deletion and re-upload procedure should do what I need though.

Thanks!

That's great to hear that I'm not the only one!