Traffic statistics FAQ

更新时间:
复制 MD 格式

This topic answers frequently asked questions about traffic statistics for web hosting.

Finding the cause of traffic overages

You can download the website log from the management console. Then, use a third-party log analysis tool, such as AWStats, to analyze your website's access records and identify the cause of the traffic overage. For instructions on how to download access logs, see Download website access logs.

Discrepancy between third-party tools and the console

Traffic data can vary between Alibaba Cloud tools and third-party services. This discrepancy occurs for the following reasons:

  • The Alibaba Cloud traffic statistics tool, available in the web hosting management console, analyzes traffic based on website access logs, including traffic from both website visits and search engines.

  • Third-party traffic statistics tools: These tools, such as CNZZ, 51Yes, and 51.la, may provide incomplete statistics. The following section uses CNZZ and Web Log Explorer as examples:

    • CNZZ: This tool works by embedding a JavaScript snippet in your web pages. As a result, it only counts traffic for pages that contain the script. It cannot track traffic for pages without the script, or for audio and video files. It also does not measure traffic from search engines.

    • Web Log Explorer: By default, this tool only tracks traffic from web page views. It does not measure traffic from file downloads, such as .rar, .zip, or .mp3 files.

Handling garbled characters in traffic reports

After the traffic statistics report feature for web hosting is enabled, when you view the traffic statistics report file, all Chinese content in the Search Phrases or Search Keywords section is displayed as garbled characters. For example, the entire keyword and phrase column is displayed as garbled characters, while the search count and percentage columns are displayed correctly.

This happens because the URL for the report page includes a parameter that determines the character set for display. If the data is written in UTF-8 format but the language parameter is set to cn, the page cannot render the characters correctly. To fix this, modify the URL parameter as follows:

  1. In the browser address bar, change cn&config to utf8&config. That is, change the lang=cn&config part of the URL to lang=utf8&config.

  2. Refresh the report page. The content should now display correctly.

Handling traffic overages

When a shared web hosting instance exceeds its monthly traffic allowance, the website may become inaccessible. Regularly monitor your daily traffic usage. For more information, see View a traffic statistics report.

The solution depends on the cause of the traffic overage:

  • Normal traffic overage: This occurs when your website has high daily traffic.

    Solution: Depending on your traffic consumption patterns, choose one of the following options:

  • Abnormal traffic overage: This can be caused by issues such as hotlinking, hosting large video files, or software vulnerabilities.

    • Hotlinking: If your website traffic is high but your visitor count is low, other websites might be linking directly to your files, such as images, music, or videos.

      Solution: Modify your website's configuration to block the IP addresses that are hotlinking your content. For instructions, see Use the Apache .htaccess file to restrict access by IP address.

    • Vulnerabilities in open-source software: Common open-source website platforms can contain exploitable security flaws, causing a surge in traffic.

      Solution: Check your website's code for vulnerabilities and apply necessary patches or updates.

    • Hosting audio or video files: Providing audio or video files for streaming or download can consume a large amount of traffic.

      Solution: Remove any unnecessary audio or video files. If these files are essential, consider purchasing a traffic package or upgrading your instance. For instructions, see Increase the traffic of a shared web hosting instance and Upgrade a web hosting instance.

    • Search engine promotions: If you have promoted your website on search engines, they may crawl your site frequently, generating significant traffic.

      Solution: Modify your robots.txt file to limit which resources search engines can access. Note that this may affect your website's promotional performance. For more information, see Use the Robots Exclusion Protocol to block search engine crawlers and Solutions for excessive traffic caused by web crawlers on web hosting.

Why traffic statistics have increased

Reason: At the end of August 2023, Alibaba Cloud upgraded the billing system for shared web hosting. The upgrade changed the traffic calculation method from analyzing website logs to measuring the total outbound network traffic for the entire site.

Note

We apologize for any inconvenience this upgrade may cause. If you encounter any issues, please submit a ticket. We appreciate your support and understanding.

The following compares the traffic calculation method for shared web hosting before and after the system upgrade:

  • Before the upgrade: Older shared web hosting instances shared a single IP address among multiple sites, making it impossible to calculate traffic data for each site based on its IP address. Therefore, traffic was calculated based on the size of access logs, where total traffic = access traffic + download traffic.

  • After the upgrade: Traffic for shared web hosting is now measured at the site level, which means the metered traffic is the total outbound network traffic for your site. This new calculation method may result in higher reported traffic compared to the previous system.

Mitigation: Alibaba Cloud has doubled the amount of data included in your traffic package. This extra traffic covers the data transfer between your site's application and its database. There is no extra charge for this upgrade.