Skip to main content

How to Bypass the CDN While Troubleshooting a Website

You can bypass the Content Delivery Network (CDN) to perform troubleshooting on your website. This allows you to determine if an issue is caused by the CDN configuration or by your origin server. This procedure is available to customers using Hostek's...

You can bypass the Content Delivery Network (CDN) to perform troubleshooting on your website. This allows you to determine if an issue is caused by the CDN configuration or by your origin server. This procedure is available to customers using Hostek's supported CDN services.

Important: Bypassing the CDN is a temporary troubleshooting step. It does not permanently change your site's configuration or how the public views your website.

Before you begin

You will need:

  • A Hostek hosting account with a supported CDN service enabled.

  • Access to your domain's DNS settings or the ability to modify your local hosts file.

Bypassing the CDN via the hosts file

The most common way to bypass a CDN for testing is to point your domain directly to the origin server's IP address on your local machine.

  1. Identify the IP address of your origin server. You can find this in your Hostek account dashboard or by contacting Hostek support.

  2. Open the hosts file on your computer.

    • Windows: Open Notepad as an Administrator and open C:\Windows\System32\drivers\etc\hosts.

    • macOS/Linux: Open the terminal and use sudo nano /etc/hosts.

  3. Add a new line at the bottom of the file using the following format: [Origin IP Address] [Your Domain]

    Example: 192.0.2.10 example.com

  4. Save the file and close the editor.

  5. Clear your browser cache and visit your website.

Bypassing the CDN via a Subdomain

If you need to test the site on multiple devices without modifying local files, you can create a temporary subdomain that does not use the CDN.

  1. Log in to your control panel (e.g., cPanel).

  2. Navigate to Zone Editor or DNS Manager.

  3. Create a new A record for a subdomain, such as test.example.com.

  4. Point this record directly to your origin server's IP address.

  5. Access the site via the subdomain to test the origin server directly.

Confirm the result

  • The website loads directly from your server, bypassing the CDN's caching layer.

  • You can now determine if the issue persists. If the site works on the subdomain or via the hosts file but not on the primary domain, the issue likely lies within the CDN configuration.

If the site still does not load

If the site fails to load even after bypassing the CDN, the issue is likely with the origin server, the web server configuration, or the application itself.

  1. Check your server's status in your Hostek dashboard.

  2. Verify that your local files and databases are functioning correctly.

  3. Contact Hostek support for further investigation of the origin server.

Limitations

  • This procedure only bypasses the CDN for the specific methods described.

  • Changes made to the hosts file only affect the device you are currently using.

  • Creating a subdomain is a public change; ensure you use a non-production subdomain for testing.

Did this answer your question?