You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: src/content/docs/support/troubleshooting/general-troubleshooting/gathering-information-for-troubleshooting-sites.mdx
+94-39Lines changed: 94 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,34 @@ customers due to security and liability concerns.
16
16
17
17
---
18
18
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:
| 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
+
:::
20
47
21
48
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.
22
49
@@ -32,7 +59,7 @@ For security reasons Cloudflare support cannot open compressed files such as ZIP
32
59
33
60
Some browsers either require a browser extension or cannot generate a HAR. When installing a browser extension, follow the instructions from the extension provider.
34
61
35
-
### In Chrome
62
+
####In Chrome
36
63
37
64
1. In a browser page viewed in Incognito Mode, right-click anywhere and select **Inspect Element**.
38
65
@@ -58,23 +85,23 @@ As of Chrome 130, this exports a sanitized HAR with redacted cookies and persona
58
85
59
86
:::
60
87
61
-
### In Firefox
88
+
####In Firefox
62
89
63
90
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).
64
91
65
92
2. Browse to the URL that causes issues.
66
93
67
94
3. After duplicating the issue, right-click and choose **Save All As HAR**.
68
95
69
-
### In Microsoft Edge
96
+
####In Microsoft Edge
70
97
71
98
1. In a Private window, navigate to **Developer tools** (use `F12` as a shortcut) and select the **Network** tab.
72
99
73
100
2. Browse to the URL that causes issues.
74
101
75
102
3. After duplicating the issue, click on **Export as HAR** followed by **Save As...**.
76
103
77
-
### In Safari
104
+
####In Safari
78
105
79
106
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**
80
107
@@ -84,7 +111,7 @@ As of Chrome 130, this exports a sanitized HAR with redacted cookies and persona
84
111
85
112
4. Ctrl + click on a resource within Web Inspector and click **Export HAR**.
86
113
87
-
### In Mobile
114
+
####In Mobile
88
115
89
116
**For Android:**
90
117
@@ -118,13 +145,15 @@ As of Chrome 130, this exports a sanitized HAR with redacted cookies and persona
118
145
119
146
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).
120
147
121
-
---
148
+
### Export Console Log
122
149
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
+
:::
124
153
125
154
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.
126
155
127
-
### In Chrome
156
+
####In Chrome
128
157
129
158
1. Go to the **Console** tab from the DevTools bar.
130
159
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
134
163
135
164

136
165
137
-
### In Firefox
166
+
####In Firefox
138
167
139
168
1. Go to the **Console** tab from the Web Developer Tools bar.
140
169
2. Go to the Console Settings and select **Persist Log** and **Show Timestamps**.
141
170
3. Leave the console open and perform the steps that reproduce the issue.
142
171
4. Right click, **Select All** messages and **Export Visible Messages to File**.
143
172
5. Attach the log file to your support ticket.
144
173
145
-
### In Microsoft Edge
174
+
####In Microsoft Edge
146
175
147
176
1. Go to the **Console** tab from the Developer Tools bar.
148
177
2. Go to the Console Settings and select **Preserve Log**.
149
178
3. Leave the console open and perform the steps that reproduce the issue.
150
179
4. Right click on any of the items within the **Console** tab and select **Save as** log file.
151
180
5. Attach the log file to your support ticket.
152
181
153
-
### In Safari
182
+
####In Safari
154
183
155
184
1. Go to the **Console** tab from the Web Inspector bar.
156
185
2. Tick the box **Preserve Log**.
157
186
3. Leave the console open and perform the steps that reproduce the issue.
158
187
4. Select all the messages, right click and **Save Selected** to a log file.
159
188
5. Attach the log file to your support ticket.
160
189
161
-
---
190
+
### Capture a NetLog dump
162
191
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
+
:::
164
195
165
196
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/).
166
197
@@ -183,7 +214,15 @@ You can only generate a NetLog dump on the Google Chrome, Opera or Microsoft Edg
183
214
184
215
---
185
216
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
+
:::
187
226
188
227
[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.
189
228
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
192
231
193
232
Replace `www.example.com` with your domain and hostname. Note the `colo` field from the output.
194
233
195
-
---
234
+
### Troubleshoot requests with curl
196
235
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
+
:::
198
239
199
240
[curl](https://curl.se/) is a command line tool for sending HTTP/HTTPS requests and is useful for troubleshooting:
200
241
@@ -226,7 +267,7 @@ Review the [curl command options](https://curl.se/docs/manpage.html) for additio
226
267
227
268
View the sections below for tips on troubleshooting HTTP errors, performance, caching, and SSL/TLS certificates:
228
269
229
-
### HTTP errors
270
+
####HTTP errors
230
271
231
272
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):
232
273
@@ -242,7 +283,7 @@ directly to your origin web server, contact your hosting provider for
242
283
assistance.
243
284
:::
244
285
245
-
### Performance
286
+
####Performance
246
287
247
288
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:
248
289
@@ -275,7 +316,7 @@ by denoting a new line with `\n` before each variable. Otherwise, all
275
316
metrics are displayed together on a single line.
276
317
:::
277
318
278
-
### Caching
319
+
####Caching
279
320
280
321
cURL helps review the HTTP response headers that influence caching. In particular, review several HTTP headers when troubleshooting Cloudflare caching:
281
322
@@ -290,7 +331,7 @@ cURL helps review the HTTP response headers that influence caching. In particula
290
331
You can refer to the [Cloudflare Cache documentation](/cache/get-started/) for more details.
291
332
:::
292
333
293
-
### SSL/TLS certificates
334
+
####SSL/TLS certificates
294
335
295
336
#### Reviewing Certificates with curl
296
337
@@ -321,15 +362,25 @@ If troubleshooting browser support or confirming what TLS versions are supported
321
362
-`--tlsv1.2 --tls-max 1.2`
322
363
-`--tlsv1.3 --tls-max 1.3`
323
364
324
-
---
365
+
### Temporarily pause Cloudflare
325
366
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
+
:::
327
370
328
371
For more details, refer to [Pause Cloudflare](/fundamentals/manage-domains/pause-cloudflare/).
329
372
330
373
---
331
374
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
+
:::
333
384
334
385
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.
335
386
@@ -341,7 +392,7 @@ requests.
341
392
342
393
Review the instructions below for running traceroute on different operating systems. Replace `www.example.com` with your domain and hostname in the examples below:
343
394
344
-
### Run traceroute on Windows
395
+
####Run traceroute on Windows
345
396
346
397
1. Open the **Start** menu.
347
398
@@ -367,7 +418,7 @@ tracert -6 www.example.com
367
418
368
419
6. You can copy the results to save in a file or paste in another program.
369
420
370
-
### Run traceroute on Linux
421
+
####Run traceroute on Linux
371
422
372
423
1. Open a terminal window.
373
424
@@ -387,7 +438,7 @@ traceroute -6 www.example.com
387
438
388
439
3. You can copy the results to save in a file or paste in another program.
Alternatively, follow the same Linux traceroute instructions above when using the Mac OS terminal program.
398
449
399
-
---
450
+
### Add the CF-RAY header to your logs
400
451
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
+
:::
402
455
403
456
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:
404
457
405
-
### For Apache web servers, add `%{CF-Ray}i` to LogFormat
458
+
####For Apache web servers, add `%{CF-Ray}i` to LogFormat
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
+
:::
423
478
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 what’s 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.
425
480
426
481
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.
427
482
@@ -433,7 +488,7 @@ For MacOS users, MTR can be installed through [homebrew](https://formulae.brew.s
433
488
For Windows users, see [WinMTR](https://github.com/White-Tiger/WinMTR/releases).
434
489
:::
435
490
436
-
### How do I use MTR to generate network path report?
491
+
####How do I use MTR to generate network path report?
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/).
459
514
460
-
---
461
-
462
-
## Run Packet Captures
515
+
### Run Packet Captures
463
516
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
+
:::
465
520
466
521
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.
0 commit comments