0

I'm facing an issue of Google not picking up my new meta description for a specific page template. This page is currently being redirected to a different page on the site. Previously, the meta description was some generic copy that didn't describe the page properly.

I employed the help of Yoast for WordPress to serve up a better description based on the content of that page by using snippet variables:

{first name} {last name}, an employee of {employer} in {city}

This new meta description was implemented after a 301 was put on these pages.

My issue is that Google is not picking up the new meta description. I've requested a recrawl but it did not change the results shown.

My questions:

  • Will Google pick up the new meta description if the page has a 301 redirect?

  • Does Google read commented out meta descriptions?

  • If Google does NOT read the new meta descriptions of a page that is being redirected, will it maintain the old meta description?

  • If the previous question is true, how would I go about implementing the new description without removing the 301 redirect?

1
  • Google sometimes chooses to use old titles and descriptions. I don't think it has anything to do with the redirect. Not much you can do about it either. Apr 25, 2019 at 12:32

1 Answer 1

1

Well, that depends on the type of redirect...

There are two types of redirects, ones that are handled by the server (header response) and those handled by the users browser.

Header Redirects

Header redirects are handled by the server and therefore no information other than the instruction to forward the user from one location to another is passed - in other words, crawlers and users do not see any previous information from any other page apart from the final destination.

Examples of common header redirects are:

  1. htaccess: Redirect 301 / http://www.example.com/new-url/
  2. Nginx redirect: Return 301 $scheme://www.example.com/new-url/;
  3. Lighttpd: url.redirect = ( "" => "http://www.example.com/new-url/")
  4. PHP: header('Location: http://www.example.com/new-url/');

User Browser Redirects

These redirects are handled by the browser, client or crawler, and both the start and destination source code are viewable.

These types of directions look something like this:

  1. Meta Refresh <meta http-equiv="refresh" content="0; URL='http://www.example.com/new-url/'" />
  2. JavaScript: window.location = "http://www.example.com/new-url/";

Summary

Browsers, clients and crawlers do not see any previous page contents when the website is using a header redirect. This includes the contents of <html> <head> <body> and any other information included on the page such as meta descriptions and page titles.

So, essentially, your new page must have everything you want crawlers and users to see, no information is passed from old, to new, under a header redirect. Of course you could use PHP to populate the meta description and title, from a previous SQL entry or document, but that's not something I will include or give any direction on in this answer as it would be out of SCOPE.

But don't just take my word for it, give it a try yourself, using CURL.

Use a Linux Shell or if you use Windows simply download Ubuntu from the Microsoft Store.

  1. CURL on the final destination: curl https://www.example.com/new-url/ > new-url.html
  2. CURL on old URL curl https://www.example.com/old-url/ > old-url.html

Then using your favourite shell viewer/editor, in my case pico, pico old-url.html and pico new-url.html, you will notice, the new one is populated, the old one is empty. What curl sees, is what crawlers and browsers see. If you want to see the header responses then use -D flag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.