Website Without PHP
English (United States)US
  • English (United States)
  • Dutch (Netherlands)
Menu

HTTP header

Also known as: response header, header

An HTTP header is a short line of extra information that a browser and a website send each other with every page request, invisible to the visitor.

Read the explanation

Web basics Last updated:

An HTTP header is a short line of extra information that a browser and a website send each other with every page request, invisible to the visitor. You never see headers on the page, but they shape how your site loads and how safe it is.

What is an HTTP header?

Written as a name and a value, headers tell each side things the page itself does not say: what type of file is coming, how long it may be cached, which language the visitor prefers or which security rules apply.

When you open a page, your browser sends a request to the web server. That request carries request headers, such as the browser name, the languages it accepts and any cookies. The server answers with a status code and response headers, followed by the page itself.

Each header is a single line. Content-Type: text/html says the answer is a web page. Cache-Control: max-age=3600 says the browser may reuse it for an hour.

Location is used for redirects, and Set-Cookie stores a cookie in the visitor’s browser.

For site owners the response headers matter most, because your server configuration, PHP and your own plugins decide what they say.

What HTTP headers mean for a PHP or WordPress site

Which PHP version does your site report?

We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

On a PHP site, headers come from three places: the web server, PHP itself and the code that runs on top of it, such as WordPress and its plugins. Depending on the expose_php setting in php.ini, PHP adds a header called X-Powered-By that names the language and often the exact version. The web server may add a Server header with similar details.

That is useful for debugging and unhelpful for privacy. Anyone scanning the internet can read the header, see an old PHP version and know which known vulnerabilities to look for. Removing the header does not fix an old version, but it stops you from announcing it.

Headers are also where security headers live. They tell the browser to refuse certain risky behavior, for example loading scripts from unknown sources or showing your site inside someone else’s frame.

How to check your headers

The quickest way is your browser. Open the developer tools, choose the Network tab, reload the page and click the first request in the list. Under Response Headers you see every line your server sent.

A terminal gives the same result with curl -I and your address.

Look for four things. First, does X-Powered-By or Server show a version number? Second, is a redirect from http to https in place?

Third, does the Cache-Control line match what you expect? Fourth, are security headers present at all?

If you want a quick answer about the PHP part, you can check your PHP version with the free tool, which reads the public headers of your site and tells you which PHP version is visible from the outside.

When to act on what you find

A version number that points to an unsupported release is a reason to plan an update. A missing security header is lower urgency, but worth adding when you next touch the server configuration. Headers that suddenly change after a hosting move or an update are a sign that something in the setup differs from before, and that deserves a look.

If your site runs an old PHP version, we update PHP in WordPress by moving it to a supported release, with a test on a copy first. If the headers show your site is behaving strangely and pages fail to load, the status codes in the same response often point to the cause.

Not sure how this applies to your site?

Ask a person to take a look. We check which PHP version your site runs and whether the fix is in, and tell you the next step.

Ask a person to take a look

Or have PHP updated right away: PHP update from $555 excl. VAT

Frequently asked questions

Can visitors see my HTTP headers?

Yes. Anyone can read the response headers of your site with browser developer tools or a command-line tool. That is why a header that names your exact PHP version can tell outsiders more than you intended.

How do I see the HTTP headers of my website?

Open your browser's developer tools, go to the Network tab, reload the page and click the first request. The response headers are listed there. You can also run curl -I followed by your address in a terminal.

Can I change my HTTP headers?

Yes. You can set them in the web server configuration, in a PHP file or through a plugin. Where you change them depends on your hosting, and a wrong value can break caching, logins or the whole page, so test the change first.

Share this page

Ask your AI to explain

Opens the chat with a question about this page. An AI answer can differ; the sources above are leading.

This question is sent along: Summarise the confirmed facts on https://websitewithoutphp.com/en-us/glossary/http-header/ in 5 short points, with the source per point.

  1. Domain
  2. Check
  3. Result
  4. Report

Which PHP version does your site run?

Enter your domain. We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

We keep the domain and the result, never your IP address.