Category: Web

How to log HTTP_HOST in apache logs on machines with many hostnames

comments Comments Off on How to log HTTP_HOST in apache logs on machines with many hostnames
By , July 30, 2015

Sometimes you find yourself operating web servers that handle many many hostnames, but they do not correlate to separate virtual hosts for each hostname.


  • URL Forwarders
  • URL shorteners
  • “Parked” pages (“This domain coming soon!”)
  • PPC platforms
  • Expired domain aggregators

You end up in a situation where a lot of domains are all coming through the same host config and ordinarily unless you are trapping for it in your code somewhere (“HTTP_HOST” environment variable) you wouldn’t know which requests are for which hostnames. Most of the time, you may not care.

Then the DDOS hits, or some other event where it suddenly becomes very important, urgent even, to know which hostname is causing all the problems so that you can pull the plug on it / reroute it someplace else or somehow put out the fire. Read more »

The difference between a 301 and 302 URL redirect

By , July 7, 2010

I read this article about redirecting domains and also get asked this every once in awhile by customers: what is the difference between a regular “URL Redirect” (basically one done with a “302 Found” header) and a “301 Redirect” (done via a “301 Moved Permanently” header)?

Read more »

A very handy feed validator tool

By , May 11, 2010

I was really scratching my head wondering why I could net get the feed for this website to load into a website aggregator. A quick google on the problem found this post with a similar problem, which led me to…..

Read more »