Select an Account to Sign In

Thryv

Text & Email, Appointment Scheduling, Customer Database

MyDex Account

Pay Bills, View Reporting, Manage Your Listings

Share: Share to Facebook Share to Twitter Share to LinkedIn

Find Broken Links and Create 301 Redirects with Google Analytics

By | 07.31.14
Find Broken Links and Create 301 Redirects with Google Analytics

Server headers can be a quick window into the health of your website. If you are running Google Analytics on your website, use the below tutorial to export top landing pages, crawl these pages for HTTP status codes and then create 301 redirects to the best appropriate page.

Export Top Landing Pages from Google Analytics

  • Open Google Analytics and go to Behavior > Content > Top Landing Pages.
  • Save yourself some time and filter out query strings (?).

Export Data from Google Analytics

Google Analytics export 5000 rows
  • Change the number of rows you are viewing to 5000. This is also the max number of rows that you can export.
  • Select export as a spreadsheet.

Trim and Concatenate for the Full URL

  • Delete everything from the spreadsheet except the URL.
  • In the second column create a formula that trims any whitespace from the URL. Also concatenate the full URL of your domain.
    =TRIM(CONCATENATE("http://www.dexone.com",A6))

Get the HTTP Status Codes

  • Download a HTTP Status Checker like Link Sleuth or Screaming Frog
  • Run against the URLs you have downloaded from Google Analytics.
  • Import this data into your spreadsheet.

Sort by HTTP Status Codes

  • Look for status codes that are a 404 error code.
  • Find a new match on your site and create a redirect in your .htaccess file using the format below:

    Redirect 301 /oldpage.html http://www.yourdomain.com/newpage.html
    Redirect 301 /oldpage2.html http://www.yourdomain.com/newpage2.html

Be sure to save a backup copy of your .htaccess file and be sure that you have FTP access to your website before making this change. Need help? Leave your questions in the comments section.

Share: Share to Facebook Share to Twitter Share to LinkedIn
Comment

Like what you see?
get more free content.

Next Up In SEO

The Silent SEO Killer: Site Load Time

Laundry. After a weekend of knocking out chores, running errands, and cleaning the house, it always seems to be...

Read More

SEO Tip from the Experts: Target Multiple Keywords at Once

According to Moz, a leading search engine optimization (SEO) firm, it’s no longer good enough to focus most of...

Read More

Which businesses get the biggest bang for their local SEO buck?

Obviously, local search engine optimization (local SEO) is pretty critical for any small or medium-sized business. When you don’t...

Read More

Explore the Blog