Jump to content

Pages that use GET for their content on Google and other search engines


slj90

Recommended Posts

Say I had a website which uses GET to gather an ID from the URL.

This ID is then used to retrieve data for page, such as the title, description and other page contents.

 

Will Google still be able to find and display these pages in search results when the base page has no content?

 

Do I need to do anything imparticular for Google and other search engines to be able to find these pages?

 

If its not possible are there any solutions to this other than each page being its own unique page/file?
 

Thanks,

 

Link to comment
Share on other sites

It will work just fine. Of course, you may want to verify if such ID really exists in your database (I guess you will output content from database?) and only display page if verification succeeds. Otherwise, you may want to redirect to index (or another page of your website) or display 404 error page. It may sound obvious for many developers, but I saw a great deal of examples where entering something like somedomain.com/article-xyz (where xyz is some number) displayed "normal" pages (with HTTP code 200) and content like:

<h1>{{article_title}}</h1>
<p>Posted by {{author_name}} on {{article_date}}</p>
<p>{{article_content}}</p>

Basically, they were displaying content of template files while no content such be displayed in such situations.

Link to comment
Share on other sites

Well, yes and no. Google will have no idea that domain.com/index.php?id=45678 exists with unique content separate from just index.php. Unless it encounters a link to that page, then it'll follow it and index it.

 

Unless I'm totally mistaken by how things are done nowadays, Google isn't going to guess at query string values to find pages, but it will follow links it encounters.

Link to comment
Share on other sites

Good point, Sepodati. I thought it's very obvious that links to content pages need to be placed somewhere in order for pages to be discovered, but after reading your post I guess your explanation will be helpful for newbie webmasters who expect search engines to discover internal content (without any links leading to it) magically.

Link to comment
Share on other sites

If a webPAGE has a link in it that naturally uses a GET via a url string buried in said page, then yes, google will follow it. Or if the url that launched that webPAGE has q query string as part of it, then yes again, google will follow it.

 

The question is do you want it to do that?

Link to comment
Share on other sites

Dynamic pages do work this way in most cases as in for example something like:

 

 

asite.xyz/index.php?page=blog&id=123-some-blog-title-slug
For years however, the best practice was to utilize rewrites or url parsing so that instead of url parameters, the actual published url was:

 

asite.xyz/page/blog/123-some-blog-title-slug.html
Rewriting isn't the easiest thing to understand at times, especially without a good working understanding of regular expressions, not to mention the parts of a URI and how you can extract them.

 

What people often misunderstand about rewriting is that it works on the requests the server receives. In other words, when you render you pages, it is up to you to render URL's in links. Rewriting does not magically change the URL's in your HTML for you. You need to have a plan and output the URL's that are likely to be accepted by Google.

 

You want to read the material and watch the videos that Google publishes for people to help them answer these types of questions for themselves. This page for example: https://support.google.com/webmasters/answer/6001170?hl=en

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.