CDN Mapping

What is a CDN?

A Content Delivery Network (CDN) is a distributed server network that delivers website content to users based on their geographic location.

CDNs enhance performance, speed, and reliability by caching static assets like images, stylesheets, scripts, and videos closer to the user. This reduces server load and latency, improving page load times and overall user experience.

What is CDN URL Mapping in WP Ghost?

CDN Mapping in WP Ghost allows you to change the WordPress common paths for external domains used as CDN endpoints.

Since WP Ghost only changes paths for the local domain by default, this feature enables it to modify paths for CDN domains as well.

Why is Important to Use CDN Mapping?

When using a CDN service to optimize performance, some paths, especially those containing identifiable information like plugin names, may still expose vulnerabilities or reveal WordPress usage. CDN Mapping ensures that the WordPress common paths are rewritten, preserving security even when external CDN domains are used.

WP Ghost supports automatically CDN Mapping by integrating with popular CDN and caching plugins, such as:

  • WP Rocket
  • CDN Enabler
  • Power Cache CDN
  • WP Cache CDN
  • EWWW
  • JCH Optimize
  • Hyper Cache CDN
  • Bunny CDN

This feature is particularly useful for users relying on CDN plugins and services, as it extends WP Ghost’s path-changing capabilities to CDN domains.

Note! WP Ghost does not add CDN functionality to your website. Instead, it modifies paths for CDN domains that you specify.

WP Ghost automatically detects CDN domains in some caching plugins. However, if the paths are not updated automatically, you can manually configure them.

How to Use CDN URL Mapping in WP Ghost

Activate Safe Mode or Ghost Mode

Begin by activating Safe Mode or Ghost Mode to open the path customization process.

  1. Access your WordPress dashboard after installing and activating the WP Ghost plugin.
  2. Go to WP Ghost > Change Paths > Level of Security.
  3. Select Safe Mode or Ghost Mode. Safe Mode provides basic protection, while Ghost Mode offers more advanced security features.
Activate Safe Mode or Ghost Mode

Add New CDN URL

  1. Go to WP Ghost > Mapping > CDN section.
  2. If your CDN domain is not listed, enter the CDN domain you’re using.
  3. Click the Save button to apply the changes.
Add New CDN URL

WP Ghost will apply the same path changes to the specified CDN domain as it does to your local domain.

Example:

  • If your default path is https://domain.com/wp-content/uploads/image.jpg
  • And your CDN serves assets via https://cdn.domain.com/wp-content/uploads/image.jpg
  • WP Ghost can change the path to https://cdn.domain.com/custom-path/uploads/image.jpg
  • This ensures that paths are hidden and secure, even when served through a CDN.

Recommendations

Always test CDN Mapping after enabling it to confirm paths are properly updated. If your CDN plugin is unsupported or paths are not automatically detected, use manual mapping.

WP Ghost extends its path-hiding features to external CDN domains by using CDN URL Mapping, enhancing both performance and security for WordPress websites.