slj90 Posted October 29, 2017 Share Posted October 29, 2017 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, Quote Link to comment Share on other sites More sharing options...
requinix Posted October 29, 2017 Share Posted October 29, 2017 Will Google still be able to find and display these pages in search results when the base page has no content?Considering how you've managed to describe how 95% of the internet works, yes. Quote Link to comment Share on other sites More sharing options...
phpmillion Posted October 30, 2017 Share Posted October 30, 2017 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. Quote Link to comment Share on other sites More sharing options...
Sepodati Posted October 30, 2017 Share Posted October 30, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
phpmillion Posted October 30, 2017 Share Posted October 30, 2017 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. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted October 30, 2017 Share Posted October 30, 2017 (edited) 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? Edited October 30, 2017 by ginerjm Quote Link to comment Share on other sites More sharing options...
gizmola Posted October 31, 2017 Share Posted October 31, 2017 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.