Cloudflare workers SEO performance

I am looking to use Cloudflare workers to serve a website and keep the existing routes for SEO purposes and was wondering how it will perform on Google.

Basically, I am moving my existing website to WebFlow, and I don’t want to lose my existing routes when I move to WebFlow. the problem is that WebFlow doesn’t allow to nest routes when using their CMS, so for example something like (/old/path/name/1) will have to become (/old-path-name-1) which is bad for SEO (since I currently have good ranking/traffic).

So, in order to solve this, I created a Cloudflare worker to route requests coming to my domain to the correct corresponding page in WebFlow. so, when someone request “/old/path/name/1” it will match it with the correct page from WebFlow and return that page (but the browser will still see “/old/path/name/1” ).

It works great and everything is fine, But my question is how would Google see this exactly? Is it okay for SEO?

I tested it with different SEO tools and it seems to be okay, does anyone have more experience/insight on using Cloudflare workers for a similar use case?

Thanks

Depending on the “app”, the Workers, there should be setup some 301 redirection, if possible.

Because, from my understanding Google, if the “old” URLs would still be available in the sitemap, which Google indexes, then without proper 301 SEO redirection setup, Google would get 404 error for them and then you are a little bit “in trouble” if so.

  • you would also get a report for them

The new URLs would also need to be indexed and they are treated as new URLs.

So, if you want to keep the good position within the results for “old” URLs, for which you should setup 301 SEO redirection, I would not remove them from sitemap, rather I would keep them as is just with the 301 HTTP redirect to the “new” one.

  • keep in mind, the “new” one are “one level” up/shorter right?

Otherwise, the same time and process would be needed to index the “new” URLs and get them back to the same position (hopefully) as the “old” ones were.

May I ask if you are using History API here or not?

1 Like

Yes, the old URLs will be available in the new sitemap.

Basically, if you request the “old” URL (example.com/old/path/name/1) it will return 200 successfully and no redirect needed. you would be able to navigate through the website normally.

May I ask if you are using History API here or not?

No, I am not.

If I understand it correctly, your Worker will pass along the HTML content from the origin to the visitor, while making it look like the visitor is getting it from the old URL.

From an SEO perspective, this should work fine, but you may need to modify certain meta tags from the original HTML before they are delivered, to make sure that whatever URLs are referred to in these meta tags point to the appropriate (“old”) URL.

So if your origin sends, for instance, a “canonical tag” as:

<link rel="canonical" href="https://example.com/new-path-name" />

You’d need to convert it via Worker to

<link rel="canonical" href="https://example.com/old/path/name" />

I’d suggest you audit those tags as well as any open graph tags to see if they may need adjusting.

2 Likes