🔍 SEO ToolsFree Plan

GET_STATUS_CODE

Get the HTTP status code of a URL

Formula Signature
=GET_STATUS_CODE(url)

Returns: number

Overview

GET_STATUS_CODE retrieves the HTTP response status code for any given URL directly within Google Sheets. This function is essential for SEO professionals who need to monitor the health of their website pages at scale. Instead of manually checking each URL through a browser or external tool, you can paste hundreds or thousands of URLs into a column and instantly see which pages return 200 (OK), 301 (Permanent Redirect), 302 (Temporary Redirect), 404 (Not Found), 500 (Internal Server Error), or any other HTTP status code.

Parameters

ParameterTypeRequiredDescription
urlstringYesThe full URL to check, including the protocol (http:// or https://)

Examples

1

Check a live page

Returns the HTTP status code for a live homepage.

fx
=GET_STATUS_CODE("https://example.com")

Output

200
2

Detect a redirect

Returns 301 if the page has been permanently redirected to a new URL.

fx
=GET_STATUS_CODE("http://example.com/old-page")

Output

301
3

Find broken pages

Returns 404 when the page no longer exists on the server.

fx
=GET_STATUS_CODE("https://example.com/deleted-page")

Output

404
4

Bulk check from a column

References a cell containing a URL. Drag down to check an entire column of URLs at once.

fx
=GET_STATUS_CODE(A2)

Output

200

Use Cases

SEO Agency

Site Migration Validation

After migrating a client website to a new domain or CMS, check every old URL to confirm they return 301 redirects pointing to the correct new pages, preventing loss of organic traffic.

E-commerce

Broken Link Audit

Regularly scan all product and category pages to identify 404 errors caused by discontinued products, ensuring customers and search engines never hit dead ends.

Content Marketing

Backlink Health Monitoring

Check the status of pages that have earned backlinks to ensure link equity is not being lost due to accidental deletions or misconfigured redirects.

Market Research

Competitor Page Monitoring

Track competitor landing pages and product URLs to detect when they remove pages, restructure their site, or launch new sections.

DevOps

CDN and Server Health Checks

Monitor critical endpoints across multiple regions to quickly detect 502 or 503 errors that indicate server or CDN outages.

Pro Tips

TIP

Combine with GET_URLS_FROM_SITEMAP to automatically extract all your site URLs and then check their status codes in bulk, creating a full site health audit in minutes.

TIP

Use conditional formatting to highlight cells: green for 200, yellow for 301/302, and red for 4xx/5xx errors. This gives you an instant visual overview of your site health.

TIP

Schedule periodic checks by saving your spreadsheet with URL lists and re-running the formulas weekly to catch new issues before they impact your SEO.

This function is particularly valuable during site migrations, when you need to verify that old URLs properly redirect to new ones. It is also useful for routine technical SEO audits, where broken links and server errors can silently damage your search rankings. By combining GET_STATUS_CODE with GET_URLS_FROM_SITEMAP, you can extract every URL from your sitemap and then check the status of each one, creating a comprehensive health report for your entire website.

The function follows redirects by default and returns the final status code. It supports all standard HTTP status codes including informational (1xx), success (2xx), redirection (3xx), client error (4xx), and server error (5xx) responses. For large-scale checks, consider spacing your requests to avoid overwhelming the target server. This function works with any publicly accessible URL, including pages behind CDNs and load balancers.

Common Errors

#VALUE!

Cause: The URL is missing the protocol (http:// or https://) or is not a valid URL format.

Fix: Ensure the URL starts with "https://" or "http://". For example, use "https://example.com" instead of just "example.com".

#ERROR!

Cause: The server did not respond within the timeout period, or the domain does not exist.

Fix: Verify the domain is correct and accessible. Try opening the URL in your browser first. If the server is slow, try again later.

#N/A

Cause: DNS resolution failed because the domain name could not be found.

Fix: Double-check the domain spelling. Make sure there are no typos and the domain is still registered and active.

Frequently Asked Questions

Yes, the function follows the redirect chain and returns the final HTTP status code. If you need to see each step of the redirect chain, use the CHECK_REDIRECT_CHAIN function instead.

A healthy, accessible page returns status code 200 (OK). This means the server successfully processed the request and returned the page content.

The function can only check publicly accessible URLs. Pages behind login walls or authentication will typically return a 401 (Unauthorized) or 403 (Forbidden) status code.

You can check hundreds of URLs by dragging the formula down a column. Google Sheets processes the requests in batches. For very large lists (1000+ URLs), consider splitting them across multiple sheets to avoid timeouts.

A 503 (Service Unavailable) status code means the server is temporarily unable to handle the request, usually due to maintenance or being overloaded. This is typically a temporary condition.

Yes, the function works with any valid URL including those with query parameters (e.g., ?page=2&sort=date). Make sure the full URL is properly encoded.

Related Functions

Start using GET_STATUS_CODE today

Install Unlimited Sheets to get GET_STATUS_CODE and 41 other powerful functions in Google Sheets.