Spunk Autos

Websites and web tools

An HTTP status code template pack

Every response a web server sends starts with a three-digit status code. This pack gives a short template for each code a small business site is likely to serve: when to use it, what the visitor should see, and what a crawler or API client needs. Copy the parts that fit your shop, detailer or dealer site.

Redirect templates

301 Moved Permanently

Use when a page has a new permanent URL, such as an old services.php that became /services/. Send a Location header with the new address. Visitors see nothing; search engines move signals to the new URL over time. Avoid chains: point the old URL straight at the final one.

302 Found and 307 Temporary Redirect

Use for short-term moves, such as sending the booking page to a holiday notice. 307 keeps the request method, which matters for form posts. Switch back when the period ends.

304 Not Modified

The server sends this when a browser's cached copy is still current, based on ETag or Last-Modified. You rarely write it by hand; check that your host sends validators on images and CSS.

Client error templates

CodeWhenVisitor message template
400 Bad RequestMalformed form data or querySomething in that request did not make sense. Please check the form and try again.
401 UnauthorizedLogin needed or session expiredPlease sign in to see your service history.
403 ForbiddenSigned in but not allowedYour account does not have access to this page.
404 Not FoundNo page at this URLWe could not find that page. Try the services list or search.
410 GoneRemoved on purpose, not coming backThis page was removed. Here is where to find current offers.
429 Too Many RequestsRate limit hitToo many tries in a short time. Please wait a minute.

Server error templates

500 Internal Server Error

Show a calm page with a phone number or email so a customer can still reach the shop. Log the full error on the server; never print stack traces or file paths to the visitor.

503 Service Unavailable

Use during planned maintenance. Add a Retry-After header in seconds, for example Retry-After: 3600 for one hour, so crawlers come back later instead of treating the page as broken.

Checklist for your error pages

  1. Request a made-up URL and confirm the status is 404 with curl -I.
  2. Make the error page load without depending on the database or the app that failed.
  3. Keep the site header so visitors can navigate away.
  4. Include a contact method on 500 and 503 pages.
  5. Review server logs monthly for the most common 404 URLs and redirect the ones with real traffic.

For API endpoints

If your site has a booking or quote API, return the same codes with a small JSON body, such as an error field and a human-readable message. Clients rely on the status code first, so do not return 200 with an error inside.