featured

Shopify SEO mini-course, DAY 5: Dealing with links

Time to implement: one to a few hours.

Google loves links like this fat kid loves cake. Well I don't actually love cake that much. But brownies, now that I love. But not as much as chocolate chip cookies. Those are the best. With milk. Mmm. Wait, where was I? Oh yeah, Google and links - today we're going to cover links, how to use them for SEO, and how to deal with them when they break. Your reward for doing today's SEO work? You guessed it, cake (I'd share brownies or chocolate chip cookies, but they're um, all gone.).

Write good anchor text

So it turns out that one of the ways that Google figures out what a page is about is by looking at the content of the text used in your link when linking to a page. That text that we use when linking to a page is called anchor text.

Here's a good example:

This is the best chocolate chip cookie recipe in the world!

See the link? The text "chocolate chip cookie recipe" is the "anchor text." Google looks at that to help it know about the page being linked to.

We can use this to our advantage. Remember our goal is to help Google correctly know what each of our pages is about - because if we do that, Google can provide our page as a result on relevant searches and we gain that coveted free, qualified traffic. It also helps users know what to expect when they click a link.

So, when you link to things, both within your site, and without, make sure that your anchor text is descriptive.

What not to do

Avoid linking non-descriptive words like "this" or "click here". For example, this is an inferior approach to the example sentence above because the anchor text doesn't tell us anything about the content of the page being linked to:

Bad example:

This is the best chocolate chip cookie recipe in the world!

Another thing not to do - don't overthink this, and don't overdo it by stuffing a bunch of keywords into your anchor text, or making a bunch links with keywords just to goose this signal. Remember, Google are not dumb, they've got algorithms in place to detect you trying to game them. As with all things in SEO - learn the principles outlined here, and focus on doing something that makes sense to your visitors and feels normal and natural and you'll be fine.

Make use of link titles

link title dialog box

In Shopify when you create a link in the editor, you'll see an option to set a "link title." This does two things. It provides a nice little tooltip when someone hovers over a link (hover here to see) and it also provides one more signal to Google about the page you're linking to. So it's probably worth taking an extra moment and fill those in when you're creating links in content.

Google indexes the pages on your website and stores a link to those pages. If the URL to that page stops working, it can goof up Google's index, and prevent someone who clicks one of your links from finding what they were looking for. Google doesn't like to happen, so they will look less favorably on your site. It also causes problems for sites, Facebook posts, pins, or tweets who may be linking to you. Let's talk about how to deal with that in Shopify.

There are two primary times when you might break a link in Shopify.

  1. Let's say you had a site before you started using Shopify. The structure of the URLs on your previous site may be different from the structure of URLs on your Shopify store (probably so). If so, those older links will stop working, and we call this a "broken link."

    For example if you had an "About" page, on your old site the url may have been:

    www.yourstore.com/about

    but on Shopify it would be

    wwww.yourstore.com/pages/about

  2. If you change a URL (maybe because you were optimzing it for SEO) or delete a page in your shop, or hide or delete a product, you will have the same issue with the broken link.

Ok, so let's talk about how to work with broken links inside Shopify.

Step one: In the Shopify admin, click on "Navigation." Look underneath your link lists and you'll find a little sentence down there about URL redirects, with a link to add your first URL redirect (if it's your first time).

URL redirect area in admin

Click the link to add your first URL redirect.

Step two: You're now presented with a dialog box where you can add the old path (meaning the URL that worked before, but does not work anymore) and the new path.

Let's take our example from earlier, and see how this would look:

URL Redirect dialog

Click the "Add URL redirect." Good job, now any time someone lands on the old page, they'll be redirected to the new one. Perfect.

But Carson, what if there isn't a new corresponding page to redirect them to?

Great question, I recommend doing one of the following:

  1. Redirect to something similar. Let's say you used to carry a product, and now you don't, so the URL doesn't exist anymore. If you have something similar in your shop, you can point them to that. For a popular product, you might even consider creating a special page to explain that the particular product is gone, and what they can do now.

  2. Send them to a really good "404 page" (which we'll cover next).

Pitfall:

Avoid the temptation to just redirect broken links to the homepage.

There are some more tips for dealing with links in this article.

Have a useful 404 page for broken links you don't catch.

A "404 page" is just web talk for a page that comes up when someone tries to reach a page on your site that doesn't exist. I'm sure you've run into them before on other sites. Usually they'll say something like "Uh oh, the page you're looking for is no longer here." (But you can do better that this simple message.)

Every Shopify site automatically has a 404 page, let's talk about editing yours.

To edit your 404 page:

  1. Your theme designer may have created an easy way for you to update the 404 page. Let's check. In the admin in the navigation go to the Themes>Theme Settings (under Published Themes). Look for a section in there about "404" pages. Something like this:
    404 page in Theme Settings

  2. If you don't have a panel in the Theme Settings to edit the 404 page, don't worry. Go instead to Themes>Template Editor. Look under the "Templates" folder and you should find a page called 404.liquid.
    404 page in Theme Templates

    If you do not have a 404.liquid page in your Templates folder don't panic, you can easily create one. Click the "Add a new template" link at the top of the folder, then select "404" from the dropdown.
    Create 404 dialog

    This will cause Shopify to generate a template for you which will at least provide a search field and a link back to the home page for you.

If you have some technical savvy and are comfortable editing some HTML, or can hire someone who does, here are some ideas for creating a more useful 404 page.

Ideas for your 404 page:

  • Have a friendly explanation at the top of the page indicating why they may have arrived on this page and what's going on.
  • Guide them to a working page on your site - this can take the form of a list of links of top (or all) pages or products on your site including the homepage, and/or a search box so they can do a search for what they were after.
  • You can provide a link to a sitemap (sitemaps are covered tomorrow/Day 6).
  • Provide a means for visitors to contact you about what they were looking for (e.g. a phone number, email address, or link to your contact page).

Ok, good job - we're done for today. You can rest easy tonight knowing you've improved the experience on your site not just for Google, but for your users. Tomorrow we'll talk about some great free resources from Google to help with SEO.


TOC | Introduction | Day 1 | Day 2 | Day 3 | Day 4 | Day 5 | Day 6 | Day 7