Skip to content

Commit a18c00b

Browse files
committed
Improve troubleshooting guide clarity and organization
- Add Quick Reference table at the top to help users identify the right tool - Reorganize sections by use case (Browser-based, Command-line, Network) - Add 'When to use' tip boxes to each major section - Update heading hierarchy for better navigation
1 parent a0c0c7a commit a18c00b

1 file changed

Lines changed: 94 additions & 39 deletions

File tree

src/content/docs/support/troubleshooting/general-troubleshooting/gathering-information-for-troubleshooting-sites.mdx

Lines changed: 94 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,34 @@ customers due to security and liability concerns.
1616

1717
---
1818

19-
## Generate a HAR file
19+
## Quick reference: Choose the right tool
20+
21+
Use this table to quickly identify which troubleshooting method to use based on your issue:
22+
23+
| Issue Type | Recommended Tool | When to Use |
24+
|------------|------------------|-------------|
25+
| Page not loading correctly | [HAR file](#generate-a-har-file) | Visual issues, broken elements, slow page loads |
26+
| JavaScript errors | [Console log](#export-console-log) | CORS errors, scripts failing, browser-side errors |
27+
| Protocol errors (QUIC/HTTP2) | [NetLog dump](#capture-a-netlog-dump) | `ERR_QUIC_PROTOCOL_ERROR`, `ERR_HTTP2_PROTOCOL_ERROR` |
28+
| Slow response times | [curl (performance)](#performance) | Measuring latency, TLS handshake times |
29+
| HTTP errors (5xx, 4xx) | [curl (HTTP errors)](#http-errors) | Determining if errors originate from Cloudflare or origin |
30+
| Caching issues | [curl (caching)](#caching) | Cache misses, stale content, cache headers |
31+
| SSL/TLS certificate issues | [curl (SSL/TLS)](#ssltls-certificates) | Certificate errors, TLS version issues |
32+
| Connection timeouts/drops | [Traceroute](#perform-a-traceroute) / [MTR](#perform-a-mtr) | Network path issues, latency between hops |
33+
| Packet loss, connection resets | [Packet capture](#run-packet-captures) | Layer 3/4 issues, SSL handshake failures |
34+
| Identifying serving location | [Cloudflare data center](#identify-the-cloudflare-data-center-serving-your-request) | Determine which Cloudflare PoP is serving requests |
35+
36+
---
37+
38+
## Browser-based troubleshooting
39+
40+
These tools capture information directly from your web browser and are useful for diagnosing issues with how pages load and render.
41+
42+
### Generate a HAR file
43+
44+
:::tip[When to use]
45+
Use a HAR file when you experience **visual issues, broken page elements, slow page loads, or need to capture the full sequence of HTTP requests** made by your browser. This is often the first thing Cloudflare Support will request.
46+
:::
2047

2148
A HTTP Archive (HAR) records all web browser requests including the request and response headers, the body content, and the page load time. Be sure to use Incognito Mode or a Private Browsing window.
2249

@@ -32,7 +59,7 @@ For security reasons Cloudflare support cannot open compressed files such as ZIP
3259

3360
Some browsers either require a browser extension or cannot generate a HAR. When installing a browser extension, follow the instructions from the extension provider.
3461

35-
### In Chrome
62+
#### In Chrome
3663

3764
1. In a browser page viewed in Incognito Mode, right-click anywhere and select **Inspect Element**.
3865

@@ -58,23 +85,23 @@ As of Chrome 130, this exports a sanitized HAR with redacted cookies and persona
5885

5986
:::
6087

61-
### In Firefox
88+
#### In Firefox
6289

6390
1. While using a Private Window, use the application menu and select **Tools** > **Web Developer** > **Network** or press _Ctrl+Shift+I_ (Windows/Linux) or _Cmd+Option+I_ (OS X).
6491

6592
2. Browse to the URL that causes issues.
6693

6794
3. After duplicating the issue, right-click and choose **Save All As HAR**.
6895

69-
### In Microsoft Edge
96+
#### In Microsoft Edge
7097

7198
1. In a Private window, navigate to **Developer tools** (use `F12` as a shortcut) and select the **Network** tab.
7299

73100
2. Browse to the URL that causes issues.
74101

75102
3. After duplicating the issue, click on **Export as HAR** followed by **Save As...**.
76103

77-
### In Safari
104+
#### In Safari
78105

79106
1. In Safari, ensure a **Develop** menu appears at the top of a Private Window in the browser window. Otherwise, go to **Safari** > **Preferences** > **Advanced** and select **Show Develop Menu in menu bar**
80107

@@ -84,7 +111,7 @@ As of Chrome 130, this exports a sanitized HAR with redacted cookies and persona
84111

85112
4. Ctrl + click on a resource within Web Inspector and click **Export HAR**.
86113

87-
### In Mobile
114+
#### In Mobile
88115

89116
**For Android:**
90117

@@ -118,13 +145,15 @@ As of Chrome 130, this exports a sanitized HAR with redacted cookies and persona
118145

119146
Refer to [Okta](https://support.okta.com/help/s/article/How-to-generate-a-HAR-capture-on-an-iOS-device?language=en_US) or [Apple's](https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/GettingStarted/GettingStarted.html#//apple_ref/doc/uid/TP40007874-CH2-SW1) support article on how to generate a HAR file from an iOS device. Attach the HAR file to your support ticket alongside a screen recording from the affected iOS device. Apple devices now have [built-in screen recording functionality](https://support.apple.com/en-us/HT207935).
120147

121-
---
148+
### Export Console Log
122149

123-
## Export Console Log
150+
:::tip[When to use]
151+
Use a console log when you experience **JavaScript errors, CORS issues, or when requests are blocked or cancelled by the browser**. This captures browser-side errors that may not appear in a HAR file.
152+
:::
124153

125154
In certain situations when request is not issued or cancelled by the browser (for example, due to [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS)), we need to get JS console log output, in addition to the HAR file, to identify the root cause.
126155

127-
### In Chrome
156+
#### In Chrome
128157

129158
1. Go to the **Console** tab from the DevTools bar.
130159
2. Go to the Console Settings and select **Preserve Log**.
@@ -134,33 +163,35 @@ In certain situations when request is not issued or cancelled by the browser (fo
134163

135164
![How to find the console tab in Chrome's developer tools.](~/assets/images/support/console_snapshot.png)
136165

137-
### In Firefox
166+
#### In Firefox
138167

139168
1. Go to the **Console** tab from the Web Developer Tools bar.
140169
2. Go to the Console Settings and select **Persist Log** and **Show Timestamps**.
141170
3. Leave the console open and perform the steps that reproduce the issue.
142171
4. Right click, **Select All** messages and **Export Visible Messages to File**.
143172
5. Attach the log file to your support ticket.
144173

145-
### In Microsoft Edge
174+
#### In Microsoft Edge
146175

147176
1. Go to the **Console** tab from the Developer Tools bar.
148177
2. Go to the Console Settings and select **Preserve Log**.
149178
3. Leave the console open and perform the steps that reproduce the issue.
150179
4. Right click on any of the items within the **Console** tab and select **Save as** log file.
151180
5. Attach the log file to your support ticket.
152181

153-
### In Safari
182+
#### In Safari
154183

155184
1. Go to the **Console** tab from the Web Inspector bar.
156185
2. Tick the box **Preserve Log**.
157186
3. Leave the console open and perform the steps that reproduce the issue.
158187
4. Select all the messages, right click and **Save Selected** to a log file.
159188
5. Attach the log file to your support ticket.
160189

161-
---
190+
### Capture a NetLog dump
162191

163-
## Capture a NetLog dump
192+
:::tip[When to use]
193+
Use a NetLog dump when you experience **protocol-level errors** such as `ERR_QUIC_PROTOCOL_ERROR` or `ERR_HTTP2_PROTOCOL_ERROR`. This provides detailed network-level debugging information that goes beyond what a HAR file captures.
194+
:::
164195

165196
In some cases, in order to further troubleshoot issues related to protocols (errors such as `ERR_QUIC_PROTOCOL_ERROR`, `ERR_HTTP2_PROTOCOL_ERROR`, etc..) our Support team may ask you to provide a [NetLog dump](https://www.chromium.org/for-testers/providing-network-details/).
166197

@@ -183,7 +214,15 @@ You can only generate a NetLog dump on the Google Chrome, Opera or Microsoft Edg
183214

184215
---
185216

186-
## Identify the Cloudflare data center serving your request
217+
## Command-line troubleshooting
218+
219+
These tools are run from your terminal or command prompt and are useful for testing connectivity, performance, and server responses without browser overhead.
220+
221+
### Identify the Cloudflare data center serving your request
222+
223+
:::tip[When to use]
224+
Use this when you need to **determine which Cloudflare Point of Presence (PoP) is serving your requests**. This is helpful when troubleshooting regional issues or verifying traffic routing.
225+
:::
187226

188227
[A map of our data centers](https://www.cloudflare.com/network-map) is listed on the [Cloudflare status page](https://www.cloudflarestatus.com/), sorted by continent.
189228
The three-letter code in the data center name is the [IATA code](http://en.wikipedia.org/wiki/IATA_airport_code) of the nearest major international airport.
@@ -192,9 +231,11 @@ Determine the Cloudflare data center serving requests for your browser by visiti
192231

193232
Replace `www.example.com` with your domain and hostname. Note the `colo` field from the output.
194233

195-
---
234+
### Troubleshoot requests with curl
196235

197-
## Troubleshoot requests with curl
236+
:::tip[When to use]
237+
Use curl when you need to **test HTTP requests without browser interference**, measure performance metrics, check HTTP headers, or determine if an issue originates from Cloudflare or your origin server.
238+
:::
198239

199240
[curl](https://curl.se/) is a command line tool for sending HTTP/HTTPS requests and is useful for troubleshooting:
200241

@@ -226,7 +267,7 @@ Review the [curl command options](https://curl.se/docs/manpage.html) for additio
226267

227268
View the sections below for tips on troubleshooting HTTP errors, performance, caching, and SSL/TLS certificates:
228269

229-
### HTTP errors
270+
#### HTTP errors
230271

231272
When troubleshooting HTTP errors in responses from Cloudflare, test whether your origin caused the errors by sending requests directly to your origin web server. To troubleshoot HTTP errors, run a curl directly to your origin web server IP address (bypassing Cloudflare’s proxy):
232273

@@ -242,7 +283,7 @@ directly to your origin web server, contact your hosting provider for
242283
assistance.
243284
:::
244285

245-
### Performance
286+
#### Performance
246287

247288
curl measures latency or performance degradation for HTTP/HTTPS requests via the [`-w` or `--write-out` curl option](https://curl.haxx.se/docs/manpage.html#-w). The example curl below measures several performance vectors in the request transaction such as duration of the TLS handshake, DNS lookup, redirects, transfers, etc:
248289

@@ -275,7 +316,7 @@ by denoting a new line with `\n` before each variable. Otherwise, all
275316
metrics are displayed together on a single line.
276317
:::
277318

278-
### Caching
319+
#### Caching
279320

280321
cURL helps review the HTTP response headers that influence caching. In particular, review several HTTP headers when troubleshooting Cloudflare caching:
281322

@@ -290,7 +331,7 @@ cURL helps review the HTTP response headers that influence caching. In particula
290331
You can refer to the [Cloudflare Cache documentation](/cache/get-started/) for more details.
291332
:::
292333

293-
### SSL/TLS certificates
334+
#### SSL/TLS certificates
294335

295336
#### Reviewing Certificates with curl
296337

@@ -321,15 +362,25 @@ If troubleshooting browser support or confirming what TLS versions are supported
321362
- `--tlsv1.2 --tls-max 1.2`
322363
- `--tlsv1.3 --tls-max 1.3`
323364

324-
---
365+
### Temporarily pause Cloudflare
325366

326-
## Temporarily pause Cloudflare
367+
:::tip[When to use]
368+
Use this when you need to **quickly determine if an issue is caused by Cloudflare or your origin server**. Pausing Cloudflare routes traffic directly to your origin, bypassing Cloudflare's proxy.
369+
:::
327370

328371
For more details, refer to [Pause Cloudflare](/fundamentals/manage-domains/pause-cloudflare/).
329372

330373
---
331374

332-
## Perform a traceroute
375+
## Network troubleshooting
376+
377+
These tools help diagnose network-level issues such as routing problems, packet loss, and connection failures between your location and Cloudflare or your origin server.
378+
379+
### Perform a traceroute
380+
381+
:::tip[When to use]
382+
Use traceroute when you experience **connection timeouts, slow connections, or need to identify where in the network path an issue occurs**. This shows each hop between your device and the destination.
383+
:::
333384

334385
Traceroute is a network diagnostic tool that measures the route latency of packets across a network. Most operating systems support the `traceroute` command. If you experience connectivity issues with your Cloudflare-proxied website and [ask Cloudflare Support for assistance](/support/contacting-cloudflare-support/), ensure to provide output from a traceroute.
335386

@@ -341,7 +392,7 @@ requests.
341392

342393
Review the instructions below for running traceroute on different operating systems. Replace `www.example.com` with your domain and hostname in the examples below:
343394

344-
### Run traceroute on Windows
395+
#### Run traceroute on Windows
345396

346397
1. Open the **Start** menu.
347398

@@ -367,7 +418,7 @@ tracert -6 www.example.com
367418

368419
6. You can copy the results to save in a file or paste in another program.
369420

370-
### Run traceroute on Linux
421+
#### Run traceroute on Linux
371422

372423
1. Open a terminal window.
373424

@@ -387,7 +438,7 @@ traceroute -6 www.example.com
387438

388439
3. You can copy the results to save in a file or paste in another program.
389440

390-
### Run traceroute on Mac OS
441+
#### Run traceroute on Mac OS
391442

392443
1. Open the **Network Utility** application.
393444
2. Click the **Traceroute** tab.
@@ -396,19 +447,21 @@ traceroute -6 www.example.com
396447

397448
Alternatively, follow the same Linux traceroute instructions above when using the Mac OS terminal program.
398449

399-
---
450+
### Add the CF-RAY header to your logs
400451

401-
## Add the CF-RAY header to your logs
452+
:::tip[When to use]
453+
Use this when you need to **correlate specific requests with Cloudflare's logs** for troubleshooting. The CF-RAY header uniquely identifies each request through Cloudflare's network and is essential for Support investigations.
454+
:::
402455

403456
The **CF-RAY** header traces a website request through Cloudflare's network. Provide the **CF-RAY** of a web request to Cloudflare support when troubleshooting an issue. You can also add **CF-RAY** to your logs by editing your origin web server configuration with the snippet below that corresponds to your brand of web server:
404457

405-
### For Apache web servers, add `%{CF-Ray}i` to LogFormat
458+
#### For Apache web servers, add `%{CF-Ray}i` to LogFormat
406459

407460
```
408461
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %{CF-Ray}i" cf_custom
409462
```
410463

411-
### For Nginx web servers, add '$http_cf_ray' to log_format
464+
#### For Nginx web servers, add '$http_cf_ray' to log_format
412465

413466
```
414467
log_format cf_custom '$remote_addr - $remote_user [$time_local] '
@@ -417,11 +470,13 @@ log_format cf_custom '$remote_addr - $remote_user [$time_local] '
417470
'$http_cf_ray';
418471
```
419472

420-
---
473+
### Perform a MTR
421474

422-
## Perform a MTR
475+
:::tip[When to use]
476+
Use MTR when you need **more detailed network diagnostics than traceroute provides**. MTR combines traceroute and ping to show real-time latency and packet loss at each hop, making it easier to identify intermittent network issues.
477+
:::
423478

424-
Traceroute (MTR) is a tool that combines traceroute and ping, which is another common method for testing network connectivity and speed. In addition to the hops along the network path, MTR shows constantly updating information about the latency and packet loss along the route to the destination. This helps in troubleshooting network issues by allowing you to see whats happening along the path in real-time.
479+
Traceroute (MTR) is a tool that combines traceroute and ping, which is another common method for testing network connectivity and speed. In addition to the hops along the network path, MTR shows constantly updating information about the latency and packet loss along the route to the destination. This helps in troubleshooting network issues by allowing you to see what's happening along the path in real-time.
425480

426481
MTR works by discovering the network path in a similar manner to traceroute, and then regularly sending packets to continue collecting information to provide an updated view into the network’s health and speed.
427482

@@ -433,7 +488,7 @@ For MacOS users, MTR can be installed through [homebrew](https://formulae.brew.s
433488
For Windows users, see [WinMTR](https://github.com/White-Tiger/WinMTR/releases).
434489
:::
435490

436-
### How do I use MTR to generate network path report?
491+
#### How do I use MTR to generate network path report?
437492

438493
**Using MTR on NIX based machines**
439494

@@ -457,11 +512,11 @@ mtr -P <tcp port> -T <destination ip>
457512

458513
Please refer to this documentation, which explains more about analysing MTR: [How to read MTR](https://www.cloudflare.com/en-gb/learning/network-layer/what-is-mtr/).
459514

460-
---
461-
462-
## Run Packet Captures
515+
### Run Packet Captures
463516

464-
**Why and when do you need Packet Captures?**
517+
:::tip[When to use]
518+
Use packet captures when you experience **connection resets, packet loss, SSL handshake failures, or HTTP errors like 520, 524, and 525**. These issues occur at layers 3/4 and don't appear in HTTP logs, requiring deep packet-level analysis.
519+
:::
465520

466521
Issues that happen at the layers 3/4 occur before requests reaching Cloudflare's logging system, so they do not show up in the HTTP logs. Therefore, troubleshooting issues related to connection resets, packet loss or SSL handshake failures can be tricky without a deep investigation at the packet level.
467522

0 commit comments

Comments
 (0)