Fix Shopify Migration SEO Problems with URL Redirects

Fix Shopify Migration SEO Problems with URL Redirects

Transcription of Fix Shopify Migration SEO Problems with URL Redirects. In this webinar, we'll review how to update both in the admin directly and also through CSV exports/imports.


I work with a lot of folks or see a lot of folks talk about these issues where all of a sudden, they've migrated from some other e-commerce platform like WooCommerce, BigCommerce, and have moved over to Shopify, they're super happy about moving to Shopify, but then several weeks later, they're considering moving back because their SEO has all of a sudden taken a nose dive. After I asked a little bit more about that, people automatically assume that because they've made this transition, that Shopify is likely the one to blame here, right? We were doing great. All of a sudden, things start to tank. Well, it must be Shopify's fault.

That's not actually super accurate in how that works. The problem typically comes from issues with 404 errors that result from a changed URL pattern. So before where someone might've come from WooCommerce or BigCommerce or something like that, you might have had a little bit more customization over what your URL structure looked like. People think that it's a bad thing sometimes that Shopify has a very defined URL structure. That's not necessarily the case. I think that you can get a whole bunch of debates on either side of this.

The positive in this instance though is that we can change a ton of these to correspond to the previous URL structure without seeing too much of an issue or a hit here. So we can change that via the admin under what are called 301 redirects. So before where maybe your website, your structure was more like your domain name, .com, slash, then whatever the product handle was or whatever the page handle was or something like that, now that we're moving to Shopify, if it's a product, it's /product/, whatever the product handle is. Same thing for collections and pages, they all have that directly documented within the URL structure.

There's a lot of reasons for this, but Shopify is optimized for SEO in a lot of different ways. And while some people don't like that they don't have this additional customization to deal with, I think personally, this is a good thing, and it'll also make it even easier as people move here to make sure we can handle all these redirects properly as well because that part, that strategy's already been handled for you. Now, we need to just update so that way, when people go from maybe some old link documentation or pages that have been previously indexed, when Google tries to go and crawl those pages again, instead of getting a 404, what we need to do is implement 301 redirects to say, this is permanently moved from this location to now, this new location. And so that way, the SEO will follow with that page rather than seeing that tank when it hits a 404.

So we're going to go over today how to fix this. So this is going to improve your customer experience 'cause we're not going to be seeing all those 404s, and this is going to obviously improve off as well your standing with Google when we fix those 404 errors you're probably getting in Google Search Console. We'll do that both in the admin if we have just a handful skews, products, redirects, or whatever to handle. And then, we'll also go over how to do that via CSV imports and exports as well, just because when you're dealing with a lot of them, that's really going to be a lot easier on you. So hopefully, this is really helpful.

Starting off in the Shopify Admin Store Page

Okay. So we're just going to go ahead and start off in the admin in Shopify here. I'm using my own portfolio website basically as an example here. So I'm on Shopify, made that move after having a Next.js website that worked really, really well for a long time, but I needed just a little bit more control as far as ease of use when it comes to updating blog posts and things like that, instead of just running everything in Markdown files, how it was doing it. And so, this tended to be a little bit better. So when you get into your admin, you go down to online store, and then you're going to want to select navigation, okay?

Important information about the navigation you're using for your website and stuff in here, also, if you haven't done, updated your filters and stuff yet, this is where we used to see this down here, you'll want to go ahead and get the Shopify Search & Discovery app because that's making things a little bit more accessible when it comes to providing some more options there. That's pretty new. Actually, the very first run that I did of this video, hadn't even downloaded it yet. It was just newly available. So now that I actually have that, it might be a separate video.

So open the top right, when you go to navigation, you're going to see view URL redirects. So in this instance here, this is from the very first time I did this, this is just an example to show you. So these are redirecting from the old handle where it was, maybe before it was our domain name, /cool-product. And now, we're wanting it to redirect to domain name, /products/cool-products.

Similar to the example here, I used to have a different URL structure for my posts. Going to scroll down a little bit here. So in my previous blog that I had set up, I had done this with just a /posts/ and then, the actual handle for the article itself versus on Shopify, they have /blogs, and then what kind of block it is, in this case, /posts and then, slash, then the actual handle that we're going to use for that. So this just lets basically, when someone hits that old URL link, if it's linked up on a different site or something like that, for example, when they hit this old one, it knows, hey, instead of serving this page up, which is going to be a 404, let's go ahead and redirect this traffic and then, we're going to also shoot a message back to say, this is a 301. This has permanently moved so we're all good here.

How to Create a New URL Redirect

So let's do that real fast. In order to create a new URL redirect, we're going to go to the top right, that nice big green button. And you'll see here, this kind of gives you information about original URL, stuff like that. Yep, yep, yep. That's what we want. And so, let's say /another-cool-product, okay? And then, we want redirect it to it's /product/another-cool-product, or if you've updated the handle and stuff like that, once you've moved to Shopify, obviously, you'd want to make sure that is taken care of as well.

This is another good option, too, to make sure you're aware of this as well. There's information here. If you just want to go back to the stores homepage, maybe this is a landing page or something that you just don't support anymore, you want it redirected back to the homepage, all you have to do is just put the slash in here, so it will look like this. But in this instance, obviously, we don't want to do that. We would prefer for a product to get updated to the new product 'cause that's probably what the user wants. Go ahead and save that redirect. Says it was created. From here, we can obviously create another, but let's just go ahead and go over to view and you can see here that it's showing up.

So that part's real simple, but the instance where we have maybe hundreds or thousands of URL redirects, so large skew stores, this is super common where people would a ton of blog content and stuff like that that might have moved from one place to the other, really common for us to have to do a bunch of these. I'd really recommend looking at the exporting via a CSV option and then, reimporting that once we've had a chance to update it and we'll go over that here next.

Exporting a Spreadsheet for URL Redirects

Okay, so we saw how to create some URL redirects directly within the admin in Shopify under navigation. Now, that's real simple to do if you just have one, two, I mean maybe even up to 20 I guess if you want to spend the time doing that, but what if you have just hundreds or something like that, or even thousands, you really want to probably manage that via just a spreadsheet. That's way easier than sitting there waiting to hit save and all this fun stuff. So up at the top right corner again, you can see that we have an option to export. So we'll go ahead and try that. You can obviously just do the current page. I like to usually work with all of my URL redirects at the same time, just really depends on your situation.

And then so if you're not going to be messing around with this in a plain CSV file format, I'd go ahead and take a look at this for Excel, Numbers or other spreadsheet programs. I typically use Google Sheets. This works really well in Google sheets, no problems there. So go ahead and export, it'll send you an email to that. So whatever the email's associated with your login here, it's going to send that your way.

Now I've already done this a couple of times, so I'm going to just go over to here. This originally gives you the CSV file here and, hopefully, you can see this okay, but I think that's kind of hard to see, but let's blow it up a little. And so this originally gives you in CSV, what you can do is you can choose to right click it and then open with. From there, you can obviously just open it in something like Numbers, but like I said, tend to prefer Google Sheets. They'll make a copy of that document and just open it up directly in here, which is the document I have over here. So you can see, we've got our redirect from, and then all the old handles that we have, and then a redirect to. So these are all the Shopify approved ones. So this looks pretty simple, right?

Now where it gets really complicated obviously is when we're talking about moving around lots of data. This makes it really easy if your previous URL structure was relatively defined and we have access to those URLs. You're going to have that through various means. So however you had that in the past would be how you would want to go about that. You can get this possibly from a WooCommerce export or something along those lines to get your old product handles and stuff like that. So you might have to do products and then, do an export from there. Same thing with pages and different things, really just depends on what system you're coming from.

What I did here and what I like to do when I'm creating these is just go ahead and create another sheet here and here, I'm just going to call this dummy data just for now. And then, I have just some test data basically from Shopify. They give this nice little bit whenever developers, whenever we have to run a store and run a couple of things to test out real quick, this is just some simple dummy data that you can import into a store. So I usually use this just for some quick testing. In this instance, I'm just going to go ahead and grab, we need the handle and the title, and I'm just going to go ahead and paste all that over. And so you can see here in this instance where we're going to be working with 23 different products in this instance... Well, really only 24, right, 'cause we've got the varsity-top here. For simplicity, let's go ahead and just get rid of these guys. Excuse me. So we'll do that for simplicity's sake here.

Now in this instance, we actually don't need the title. I usually keep the title elsewhere if we need to handle-ize it, so to speak, so turn this into a product handle, but for now, we're not going to worry about this too much. So I'm actually going to get rid of this info. Now in this instance, what we want to do is we want to create new product handle. So let's say our old domain used to just be... Oops, And so now what we want to do is we want to change this. Instead, the new structure could look like domain

So obviously, we could go through, update these individually, but really, you should only have to do this a couple times and we're going to use basically the power of Google Sheets or Excel or whatever here to run some simple functions in here to just add stuff together for us here, these redirects. So again, I'm going to go ahead and get rid of this stuff. And so in this instance, we do need to, for the sake of having this in, have this start off with a slash, so maybe we only have access to the handle, at least initially. What we can do then instead, if you do equals and then concat, that concatenation means just basically to put two items together like this, so we're going to select that. You have two values that you're going to add together in this instance. If you want just a plain text value, we're going to put it in between quotation marks. So we want a slash, put a comma and then, you can either click on this or we could've typed in A2 and that would've worked as well. And then once we tab over, boom, now we have, this is our original redirect from URL handle.

Now we don't want to have to type this out for every single one. So what we're going to do is we're just going to copy this. And when we copy this, it copies the specific function, and these programs are smart enough to know when we're copying and pasting this, boom. We don't want A2 for every single one, so it updates row by row. This one's A3. This one wants A4. This one wants A5 and so on. So whether you're doing only 20 of these, or you're doing a thousand, this will work the same for you. And so that's why this is a really quick way to update product handles, save you ton of time when it comes to doing this.

Now we have to add products before so that way, we can redirect these properly, right? And we can do that with a very simple concatenate function again. So really simply, we're going to do concat and then, we're going to put it, a plain text value in between quotations. And now this time, let's try to... Well, let's go ahead and just... Now I didn't put the slash at the end. Obviously, if we were doing the trailing slash, I should've done that in front of products, so /product/. So I'm just going to go ahead and do /products without any trailing slash. And then, let's go ahead and do B2, and tab over. And you can see now, that's our new redirect to handle, and we're going to do the exact same thing over here. We're going to just paste these over.

Now, this is great, right? So we have all these additional handles and stuff that we have updated, but we need to now move them from this page... And I like doing this on this page 'cause it's a lot cleaner, especially when you're working with a lot of data, it's just a lot of easier. So using simple things, like if you have to highlight multiple cells at the same time, if you hold down command, or control I believe it is on PC, you can highlight multiple or even more simply, if you click at the top and then go all the way to the bottom, hold down shift, it'll highlight everything from that top one that you did all the way down to the bottom. So whether that's from the middle, whatever, it's just going to highlight those ones in between. Again, these are just little tips and tricks for whenever it's a really big set of data. I don't want to make this a whole thing about Excel, but this is just really helpful for me whenever I've gone through, and I've worked with a lot of these.

So we're going to go ahead and grab all of this. So I just copied that. That's command C. You could right click as well to copy or control V on a PC. We'll go over to our actual one here and what I'm going to do, I'm going to intentionally mess up here, so if we just paste directly into here, we're going to get a reference error. Basically, it's because whenever we just copy it and then paste it over, it is trying to specifically look for some sort of cell on that other sheet and so, it's really confused that we don't have that information available.

So what you should do, Mac or PC, if you do command, shift, V or control, shift, V, it will just paste over the plain text value, which is what we want. We don't want to copy over the actual function itself. We want to copy... Or paste over, I'm sorry, we want to paste over the just plain text value. And so that's the best way to do that. And we're going to go back over and we're going to do the exact same thing like here, we're going to grab all these and we're going to drop these over here, plain text value.

Redirecting URLs From Your Spreadsheet

Okay. So now you can see that we've got... Oops, sorry. Getting a little scroll happy here. Now we've got all of these new product handles that we can update and have properly redirecting from one place to the other. So from here, what we need to make sure that we do is we need to file. We're going to go ahead and download, but make sure that it's in a CSV again. We can't basically reimport it as an Excel file or Google Sheets file. It has to be the CSV. Okay? Once we've got this CSV, we'll go ahead and move over to our redirects. Let's go ahead and refresh this guy here. And then, we will import. And then just go ahead, drag and drop your redirect file. This replace file is kind of confusing. It's just if you want to replace the file that's actually chosen here. And then go ahead and upload. And it will tell you specifically that you've got 49 redirects in here and here's a preview of what that looks like. And so, that's just something you can check to see, make sure, yeah, this is looking about right. And then, we'll go back over as well to our redirects file and see, we have 49. This is 50 because we have that first row is a title so redirect to, so this is actually only 49.

So that looks great. Let's go ahead and import. It says it could take some time to complete. If you'd like, you close. Okay. So we're all good. So you can see there, we just did 20. We only added 20 and it did update some additional ones just to make sure that those were proper and all of that stuff. Okay. So there you have it. We've got all of these updated and this looks like you can see, even though those were at the bottom of the spreadsheet, that loaded at the top because at the moment, the source is kind of favoring the newer ones added. And so, that's where these are all coming from here.

Closing Thoughts

And there you go. You've now got a way to fix all of those 404 errors you're getting from customer complaints or maybe Google Search Console complaining at you and watching your SEO take a nose dive. Now that we can fix those, go ahead, implement those 301 redirects in a way that makes the most sense for you, either directly in the admin or using CSV file export and imports, and then make sure you resolve those errors and issues, too, in the Google Search Console as they come up so, that will help your SEO. It'll help fix all of those 404 errors that you're having because those 301 redirects will be properly implemented.

And to make things a little bit easier because I didn't want to make this a whole video about Google Sheets or Excel or whatever, I am going to include a link to a code snippet down in the comments here as well just so that way, you can get information on those helpful functions in Excel, whether it's concatenating or if you possibly just have the old title name, but you want to handle-ize that or create a handle out of that, this would be a way that you could remove special characters or remove the spaces, dashes and stuff like that, so that's done through a fun little deal called regex. And so, you don't have to be a developer necessarily to get too deep into the weeds on that, but knowing a couple of these handy functions and stuff will really help you when it comes to updating all that information within the redirects on the CSV imports and exports.

So I hope this was helpful. Hopefully now, you have a way moving forward to fix all of those terrible SEO errors in Google Search Console and we can make sure that customers don't see those dreaded 404 pages as well. Thanks so much.


Shopify URL Redirects

Helpful Excel/Google Sheets Functions

Back to blog