Blog Categories
Google / AdWords, Bing / Ads, and even Facebook...

Redirects between subdomains [WordPress multisite] in WP Engine – so far.

July 26, 2016.Finn.0 Likes.0 Comments
Home/Blog/SEO/Redirects between subdomains [WordPress multisite] in WP Engine – so far.

To split my site up into Digital Marketing and Writing, I had to take the Googley-Woogley posts out of my writing site and migrate them to this subdomain. To do it properly meant 301ing the URLs from the Writing site over to the Digital Marketing.

I went to check WP Engine’s redirect page. It’s cool, as cool as those things go. It has the following pages to help:

I also found redirects can be done in bulk. All it takes is adding them all to a .txt file and contacting the 24/7 tech support so they can upload it for you.

I’m quickly becoming good friends with their friendly support staff.

At this point, Wp Engine doesn’t really have any information posted on redirects between subdomains for multisite on their system, but I found the regex rules for them on StackExchange

Seriously, where would the world be without StackExchange. Here’s where I found their answer. Here’s part of the example I used:


RewriteCond %{HTTP_HOST} ^subold-staging.domain.co.uk [NC] RewriteRule ^(.*)$ http://subnew-staging.domain.co.uk/$1 [L,R=301]

I suppose WP Engine figured we’d know that.

It’d make sense, figuring the setting is semi-blogger-friendly, with a belief that the blogger has done backend migration. No faulting there. But, yeah, WP Engine takes regular Regex commands in a text doc and uploads it to the servers, which is a resource-friendly, quicker, safer alternative than using redirects from a WordPress plugin. Your WordPress website will thank you going this route.

Setting up the text file

I wrote my rules, including a ^ in the initial path as My.WPEngine.com, their backend CMS. So my rules looked like this:

RewriteRule ^/this-path/ https://workwith.natfinn.com/this-path/ [R=301,L]

I submitted a sample file to tech support for approval.

I started by logging and starting a chat.

  • Log into my WP Engine account
  • Go to my install (named by CName)
  • Click the Live Chat button at the top-right-hand side of the menu.

From there, I was able to upload the .txt doc through the chat window’s upload feature.

They double checked my list for me.

They told me the format was good. All I had to do then was make the 301 doc, which meant going back through the posts, confirming the URLS, changing up those I wanted to change up. While I was at it. I updated dead links, old YouTube code, refreshed images with new ones – as needed…

I also found out other important notes

  1. I found out that though I have a subdomain pointed to a tumblr blog, I can still get a SSL wild card (which is a step I’m going to take shortly) for my domain. This was good to hear because that meant I could keep that subdomain active.
  2. If I submit the list, it will not overwrite the ones I have in my.wpengine.com client dashboard. They will merge with the ones in my.wpengine.com client dashboard.
  3. Once the SSL is installed, they will force a protocol redirect from http:// to https://. This means I don’t have to go change all the protocols in my link right away. I’ll still want to do it to get the maximum amount of link juice possible, but for now, it can wait.

Format for the redirect, updated for WP Engine’s system.


RewriteRule ^/this-path/ https://workwith.natfinn.com/this-path/ [R=301,L]

I finished the 301 text doc over the next week and, today, I submitted the full doc to text support. It was looked over by the support staff, approved, and then uploaded.

I should have followed StackExchange, sorta, because I was told I had to take the ^ out because the system couldn’t handle it. So I made a copy of the doc, performed a mass find and replace to remove the ^, and sent them a new copy. Now they all looked like:

RewriteRule /this-path/ https://workwith.natfinn.com/this-path/ [R=301,L]

This sent the links into an infinite loop

So the redirected pages wouldn’t load.

Senior support came in to sort out the issue. In the meantime, I sent them a third .txt doc, this time with all the full path links. To quickly make the new doc, I made another copy of the original doc, and performed a find & replace that swapped out ^/ for http://www.natfinn.com/. All systems go.

The full paths did the trick.

I think. They had to set the domain source on the links to make them work. I believe I was told that if I write them this way next time, that I won’t have a problem.

In the future, when 301-ing links between subdomains on a WordPress Multisite>How WP Engine fixed it: set the domain source in the text doc. That typically means setting the full path for the source and the destination.

Now I know.

Anyone else got any additional advice?

Categories: SEO, WordPress
Privacy Policy | Copyright 2008-2020