SEO Application: Checking Status codes of your Website's url

Today I was xploring the n8n https node and one of the features therein is return the response code.
For those familiar with SEO, different status codes represent different status of your website.
301 and 302 are redirects
404 page not found
200 the page is okay and
500 means internal error.

With this information, you can do a full Status code check especially for all internal links. All you need is the sitemap/sitemap url for your target website for an easier start.

Next you are going to use the XML node to get the individual URL since n8n returns the data as below

<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="">\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url><loc></loc></url>\n  <url>

Once you get the individual URLs, just run them through

  1. The IF node to get all pages that are not 200
  2. A switch node with the different different status as the output routes

I would recommend using this IF Node nodes.
They provide the option to count your output in the filters as a third node for easy calculations

There you have it. Simple Status code checker, with no code, just HTTP requests node

Here is the sample workflow to get you started


Somewhere on the forum is a workflow, which let´s you 301/302 urls you’re being redirected to. <3

I´ll sehr tomorrow for it and post it here.

1 Like

here, we go: