Articles on: Sites & Clones

How to replace a PDF?

When you clone a website with Clonable, PDF files often remain linked to the original language version or the link gets translated and ends up giving a 404 error.

To ensure your international visitors have access to the correctly translated documents, you need to swap these links out using Substitution Rules.

There are two ways to handle this: replacing a specific PDF or setting up a standard rule for all future documents.


Method 1: Replacing a Specific PDF file

Use this method if you have a single document or a few unique files that need to be swapped.

  1. Upload the Translation: Upload your translated PDF file to the media library or server of your original (source) site.
  2. Get the URL: Copy the direct link (URL) to that new, translated file.
  3. Find the Original URL: Go to your Cloned page, right-click the PDF link, and copy the link address. This is the "Original" URL you will replace.
  4. Create the Rule:
    • Log in to your Clonable dashboard.
    • Navigate to Advanced Settings > Substitution Rules.
    • Original: Paste the link as it appears on the Cloned page.
    • Replacement: Paste the link to your new, translated PDF.
  1. Save: Apply the rule to see the change live on your clone.




Method 2: Setting a Standard Rule (Dynamic Replacement)

If you have many PDF files, you can automate the process by using a consistent naming convention. This prevents you from having to create a new rule for every single upload.

Requirement

Description

Identical Names

The filenames must be exactly the same (e.g., menu.pdf).

Case Sensitivity

Ensure capitalization matches perfectly (e.g., Manual.pdf vs manual.pdf).

Folder Structure

Upload them to the exact same folder path on your server.

Language Coding

Use a clear language suffix in the URL structure (e.g., -en vs -fr).

How to execute:

Instead of swapping a full unique URL, you create a substitution rule that targets only the language identifier in the file path.


Example: Replace mysite.com/uploads/manual-en.pdf with mysite.com/uploads/manual-de.pdf by setting a rule that changes -en.pdf to -de.pdf specifically for your file paths.



Troubleshooting Tips

  • Clear Cache: If the old PDF still shows up after creating a rule, try clearing your browser cache.
  • Direct Links: Always use the absolute URL (starting with https://) to ensure the substitution rule finds the exact match.

Updated on: 26/03/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!