This is a common site migration redirection issue. We want to change the WordPress blog posts from having .com/blog/post-name-here/ in the URL to the single post URL being just .com/post-name-here/ But we often still have a .com/blog/ landing page AND it is often still paginated like .com/blog/page/2/ So the challenge is creating a 301 Redirect […]
Redirects
How to Have a 301 Redirect Pass Google Analytics UTM Parameters
There is no secret to getting a 301 redirect to pass some sort of UTM string in a 301 redirect. It took me a half hour of Googling to realize, that at least for our nginx setup, it just worked! So if we have a marketing URL out in the wild and then we launch […]
Using WP-CLI to search-replace and Remove .html from End of URLs
Scenario: we were migrating a WordPress site from one domain to another. The blog posts all ended in .html which we wanted to remove for cleanliness and SEO. We created this code in WPENGINE to handle the redirects for any links to the old content: Domain: the URL of the old domain Source: ^(.+)\.html$ Destination: […]
Making a Redirect Work with Capitalization on WPENGINE
A client recently wanted to have a vanity URL redirect created. I had created one like https://limecuda.com/awesome-wordpress-hosting/ However, they wanted to have a URL like https://limecuda.com/Awesome-Wordpress-Hosting/ Here is how we accomplished accommodating uppercase letters using a bit of RegEx magic… Source: ^/[aA]wesome-[wW]ord[pP]ress-[hH]osting/?$ Destination: https://limecuda.com/services/hosting/ Boom. That is how you can accommodate a client who may […]
Subdirectory and Following Pages Global Redirect on WPENGINE
Here is a good way to globally redirect a subdirectory and anything that follows to a final destination. originasite.com/first-folder/other-folder/slug-here/ originasite.com/first-folder/other-folder/other-slug-here/ would be redirected to finalsite.com/new-location/ Source: ^/first-folder/other-folder/.+ Destination: https://www.finalsite.com/new-location/ Carryover the Path If you want to preserve the part you are redirecting and it go to an equivalent page you would use: Source: ^/first-folder/other-folder/(.+) Destination: https://www.finalsite.com/new-location/$1 […]
The SEO Danger of Multiple 301 Redirect “Hops”
We migrated a site from one domain to another www.originalsite.com to www.newsite.com and also made it https at the same time. I had just added the old domain in the WPENGINE Domain section to redirect to new site. It was redirecting as it should to the new equivalents. BUT In the months since the launch, […]
Ultimate Web Tools List
Fewer Than Three’s compilation of super useful web tools. These are free web-based tools we use on a day-to-day basis. Bookmark this list, we’ll making it better over time. Shortlink: https://fewerthanthree.com/tools/ Comment and suggest other web tools that should be listed. List Version 1.1.3 Search Engine Optimization Tools Identify broken links on your site http://www.brokenlinkcheck.com/ https://validator.w3.org/checklink Test […]
Single Page 301 Redirect on WPENGINE
This is what I have found as the ideal format for redirecting a single page with a Permanent (301) Redirect in WPENGINE. Source ^/url-path-here/?$ What this does is… ^ means that this is the beginning of the URL ? will let this apply whether there is a trailing slash or not $ forces the redirect […]
Global Site Redirect to Equivalent URLs on WPENGINE
Here is a good way to globally redirect an entire site from one domain to another and preserve the site paths. originasite.com/here-is-a-path/ would be redirected to finalsite.com/here-is-a-path/ Source: ^/(.+) Destination: https://www.finalsite.com/$1 (or similar if there is another path like /blog/ you want this to go after) Further Reading and Tools Redirect Checker – useful […]