unistake Posted November 15, 2010 Share Posted November 15, 2010 Hi all, I have a lot of webpages that look like example.com/demo that redirect to example.com/project-details.php?p=demo Google lists the pages as project-details.php?p=demo instead of just example.com/demo. Is there anyway to fool this internet giant!? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/ Share on other sites More sharing options...
JonnoTheDev Posted November 15, 2010 Share Posted November 15, 2010 Google is following your redirects. If example.com/project-details.php?p=demo is a valid page it will get indexed. If not it should be redirected to example.com/demo using a 301 header. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134343 Share on other sites More sharing options...
unistake Posted November 15, 2010 Author Share Posted November 15, 2010 OK, when I enter the raw web page data into the browser it does not redirect to /demo. I have heard that search engines don't like redirect pages, I think I am best leaving it as is. The url just looks messy on google. I thought there may be a way to fool the search engines to just see the made up directories. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134358 Share on other sites More sharing options...
JonnoTheDev Posted November 15, 2010 Share Posted November 15, 2010 I have heard that search engines don't like redirect pages No, that is not the case. A redirect is done for a reason. Header codes are used to distinguish the type of redirect. A 301 status means that the URL has moved permanantly i.e redirect http://www.xyz.com/oldpage.html to http://www.xyz.com/newpage.html A search engine will thank you for this information. What a search engine does not like is duplicate pages. So, if one page on your website is accessible via 2 urls i.e example.com/project-details.php?p=demo example.com/demo You will end up with a penalty and your pages will end up in the Google sandbox. Therefore you should use your .htaccess file to 301 redirect your urls. Do not worry what the links are in Googles' result pages. As long as they properly redirect, this will get updated over time. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134371 Share on other sites More sharing options...
unistake Posted November 15, 2010 Author Share Posted November 15, 2010 Good useful information, I will keep an eye on it and look in to the 301 stuff. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134519 Share on other sites More sharing options...
Tazerenix Posted November 16, 2010 Share Posted November 16, 2010 another possible solution would be to use mod_rewrite and rewrite the example.com/demo to example.com/project-details.php?p=demo so then you dont have to maintain a redirect page and google will index it as example.com/demo. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134829 Share on other sites More sharing options...
Adam Posted November 16, 2010 Share Posted November 16, 2010 There's also the less-known 'canonical' link tag you can use, to tell Google (and presumably other search engines will have adapted it) duplicate URLs are the same.. Although Google still doesn't like the redirect, so you're probably better off rewriting the URL where possible. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134901 Share on other sites More sharing options...
JonnoTheDev Posted November 16, 2010 Share Posted November 16, 2010 another possible solution would be to use mod_rewrite and rewrite the example.com/demo to example.com/project-details.php?p=demo so then you dont have to maintain a redirect page and google will index it as example.com/demo. The url should be mod rewritten & contain a 301 redirect. There is no need for any redirect page as the redirect is done via a .htaccess. A redirect must be used if there are already inbound links using the old URL otherwise duplicate content will be picked up. Although Google still doesn't like the redirect What do you mean by this? Google will understand the status codes you provide. 301 Moved permanantly, 404 does not exist, etc Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134911 Share on other sites More sharing options...
Adam Posted November 16, 2010 Share Posted November 16, 2010 Although Google still doesn't like the redirect What do you mean by this? Google will understand the status codes you provide. 301 Moved permanantly, 404 does not exist, etc In terms of SEO, Google marks you down (ever so slightly) for redirects. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134932 Share on other sites More sharing options...
JonnoTheDev Posted November 16, 2010 Share Posted November 16, 2010 In terms of SEO, Google marks you down (ever so slightly) for redirects. I've never seen this. Have you any info / links? I know there are issues if you supply too many redirects in one go as in a 404 followed by a 200 then a 301, but this is down to bad design. If you are redesigning a website the URLs may be different in a new version so you must ensure that you 301 redirect all your old URLs that are indexed in Google to your new pages. Also if pages don't exist any more a 404 ErrorDocument should be defined. You can also submit old URLs that no longer exist to Google so they can be de-indexed. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134965 Share on other sites More sharing options...
Adam Posted November 16, 2010 Share Posted November 16, 2010 I don't mean pages that have been moved, the OP wasn't asking about that. It looks like unistake's got some kind of vanity URL system in place. I don't have information at hand, but during the SEO project we did at work we created sitemaps that were validated by Google. URLs that redirected to another URL with duplicate content were reported as warnings, that should be corrected. Obviously a negative in Google's eyes.. I'll try to dig out the exact errors later. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134970 Share on other sites More sharing options...
JonnoTheDev Posted November 16, 2010 Share Posted November 16, 2010 URLs that redirected to another URL with duplicate content were reported as warnings Yes, they will be. URLs that you intend to redirect should not be submitted in a Google sitemap. Only your final target URLs should be. If the original URL is indexed and you apply a 301, Google should pick this up when it spiders the site from it's current index. There will be no penalty as all you are stating is that you have changed the URL from x to y, x is redundant. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134972 Share on other sites More sharing options...
Adam Posted November 16, 2010 Share Posted November 16, 2010 Yeah. Unfortunately though the site has literally hundreds of thousands of pages rendered from a variety of sources, so the first draft of the application that generates the sitemap wasn't perfect. My point from this though is when Google will crawl the site normally, and finds a page that redirects, it'll still mark it down for having that unnecessary redirect. Using mod_rewrite to rewrite the URL will improve SEO (ever so slightly) over redirecting the user. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134980 Share on other sites More sharing options...
JonnoTheDev Posted November 16, 2010 Share Posted November 16, 2010 My point from this though is when Google will crawl the site normally, and finds a page that redirects, it'll still mark it down for having that unnecessary redirect. Of course, but again this is down to bad design. A website should not contain internal links to old pages that redirect. All internal links on a website should point to final target URLs that return a 200 status. This is sometimes hard to implement on existing websites containing lots of pages, but you should have a central set of functions that control all mod rewritten links on your site. Therefore if you change a link it will be changed across the board and no old URLs will be left. You can then add the 301 redirect to your htaccess file to keep any current inbound links alive. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1134987 Share on other sites More sharing options...
Adam Posted November 16, 2010 Share Posted November 16, 2010 I see what you're saying, but that's not what the OP is requesting. unistake wants to have the path "/demo" displayed within the SERP, not "/project-details.php?p=demo". A 301 redirect will correctly, without penalty lead Google to the long path, but it'll use that URL within the SERP. A 301 redirect from the long path to "/demo" will result in a redirect to a URL that is redirected again.. a loop. Quote Link to comment https://forums.phpfreaks.com/topic/218710-google-ergonomics/#findComment-1135145 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.