PDF Embedder Documentation

Documentation, Reference Materials, and Tutorials for PDF Embedder

Get access to
Powerful Features!

Home » Documentation » Troubleshooting Errors » Troubleshooting the Failed to Fetch Error

Troubleshooting the Failed to Fetch Error

Seeing a “Failed to fetch” error when a PDF should be loading? This error means the URL pointing to your PDF is on a different domain than the page trying to display it. Browsers block these cross-domain requests for security reasons, so both your page and your PDF file must sit on exactly the same domain.

This guide covers the known causes of the ‘Failed to Fetch’ error in the PDF Embedder viewer and walks through how to fix each one.


Domain and Protocol Mismatches

The most frequent trigger is a mismatch between the page URL and the PDF file URL. These count as different domains even when they look almost identical:

  • https://www.example.com (page) and https://example.com (PDF)
  • https://example.com (page) and http://example.com (PDF)

For example, if a visitor loads http://www.example.com/my-page/ and the shortcode references http://example.com/wp-content/uploads/document.pdf the browser treats those as different origins and blocks the request.

SSL mismatches cause the same problem. If your WordPress admin panel runs on HTTPS but your front end still serves pages over HTTP (or vice versa), the browser refuses to load the PDF.

Checking Your WordPress URL Settings

Head to Settings > General in your WordPress dashboard and check two fields: WordPress Address (URL) and Site Address (URL). Both must match exactly, including the protocol (http or https).

If you recently added an SSL certificate, make sure both fields start with https:// and not http://. Files uploaded while the URL was set to http:// will have http:// in their stored paths and will fail to load once the site moves to https://.

Checking for CDN or Offload Plugins

Some performance or content-delivery plugins offload uploaded files to a separate subdomain or external service (for example, media.example.com). If your PDFs are being served from a different domain than your pages, PDF Embedder cannot fetch them.

Check your active plugins for any that offload media files, and either disable that behaviour for PDFs or configure CORS on the external domain. If your PDFs are hosted on Amazon S3 or a similar service, see our Hosting PDFs on Other Services guide.

Checking for Ad Blockers

Some browser ad blockers intercept PDF requests and block them entirely. In the browser console (open with F12 > Console), this appears as net::ERR_BLOCKED_BY_CLIENT.

If you see that error, rename the PDF file so it does not contain words commonly flagged by ad blockers (for example, “ad”, “banner”, or “promo”). Then update the shortcode to reference the renamed file.

Frequently Asked Questions

Below, we’ve addressed some common questions about the Failed to Fetch error.

Why does the error only happen after I upgraded to Premium?

Our PDF Embedder Premium plugin requires the PDF file to be served over HTTPS. If your WordPress Address was set to http:// when you uploaded your PDFs, those files were stored with an HTTP URL. After upgrading, you would need to update Settings > General so both URL fields use https://, then re-upload the affected PDFs or search and replace the URLs in the database.

Still have questions? We’re here to help!

Last Modified: