Pretty URLs and index.php URLs both function
Permalink
Hi,
I've got a website that has Pretty URLs turned on and working. Only problem is that both the Pretty and the standard URLs are available to visit.
An example would be thathttp://www.website.co.uk/page andwww.www.website.co.uk/index.php/page... both work show the page.
I've been told that this duplication isn't good for SEO. Is there a way to make the index.php/ version no longer work?
Many thanks for your help.
I've got a website that has Pretty URLs turned on and working. Only problem is that both the Pretty and the standard URLs are available to visit.
An example would be thathttp://www.website.co.uk/page andwww.www.website.co.uk/index.php/page... both work show the page.
I've been told that this duplication isn't good for SEO. Is there a way to make the index.php/ version no longer work?
Many thanks for your help.
No one will know about the index.php version, because all they will see are the pretty URLs when they visit your site.
Thanks Mose, but won't Google mark the site down in terms of SEO for having multiple links go to the same page?
And is it simply a case of two URLs going to the same page, or are there duplicate pages?
And is it simply a case of two URLs going to the same page, or are there duplicate pages?
It is just two URLs going to the same page.
As ukao said, it's just two URLs going to the same page. No, Google won't mark the site down for having multiple links, because no one (not even Google) will see the regular links.
How is Google going to know that the regular links are there? If someone visits your website, the only thing they will see are the pretty URLs. Google doesn't try any "test" URLs. Google simple follows what is presented in your web page, and that should only be pretty URLs.
Note that to complete the pretty URL picture, you should define URL_REWRITING_ALL as true in config/site.php.
If you have multiple domain names pointing to the same website, Google might mark you down if Google detects that.
How is Google going to know that the regular links are there? If someone visits your website, the only thing they will see are the pretty URLs. Google doesn't try any "test" URLs. Google simple follows what is presented in your web page, and that should only be pretty URLs.
Note that to complete the pretty URL picture, you should define URL_REWRITING_ALL as true in config/site.php.
If you have multiple domain names pointing to the same website, Google might mark you down if Google detects that.
I should expand on this and say that you really want the ability to specify multiple paths to a web page, and Concrete5 delivers this feature in a nice way.
You can add as many paths to a page as you want. One page could have paths of /info, /contact and /contactus. That way if someone is trying to guess how to get in touch with you, they have a good chance of finding the page.
Another reason multiple paths for the same page are very useful is that it allows you to move pages around in your site, but the page gets to keep its original path as well as the old one. If someone bookmarked an important page, such as /help/afterhours/phonesupport, and you decide to move the page to /help/supportoptions/phone, the page can keep its original path as well as the new path. Your customer can still find the information they need with their old bookmark.
You would think that this could get really messy, but it doesn't. No matter how many paths a page has, only one path is the canonical path. When Concrete5 constructs a link to a page, it always uses the primary or canonical path.
When Google or anyone else visits your site, they will only ever see the canonical link to a page. All of the other paths will be invisible. The other paths would only be useful to someone who was trying to get to a page through an old bookmark or an outdated search engine.
You can add as many paths to a page as you want. One page could have paths of /info, /contact and /contactus. That way if someone is trying to guess how to get in touch with you, they have a good chance of finding the page.
Another reason multiple paths for the same page are very useful is that it allows you to move pages around in your site, but the page gets to keep its original path as well as the old one. If someone bookmarked an important page, such as /help/afterhours/phonesupport, and you decide to move the page to /help/supportoptions/phone, the page can keep its original path as well as the new path. Your customer can still find the information they need with their old bookmark.
You would think that this could get really messy, but it doesn't. No matter how many paths a page has, only one path is the canonical path. When Concrete5 constructs a link to a page, it always uses the primary or canonical path.
When Google or anyone else visits your site, they will only ever see the canonical link to a page. All of the other paths will be invisible. The other paths would only be useful to someone who was trying to get to a page through an old bookmark or an outdated search engine.
Mose,
Thanks so much for your explanation. I've just got a couple of questions, the most important one to us being question 3.
1. What does adding the 'define URL_REWRITING_ALL as true' code to the config/site.php file do? Or more to the point, what has been happening since it's not there?
2. I have two URLs, website.com/contact and website.com/index.php/contact. You say that they are the same page with different addresses pointing to it. As I understand the file structure of websites, wouldn't the first URL go to a page in the root folder, and the second URL go to a page in an index.php folder?
3. If Google can't see the other URLs, how come when I do an exact searches for the string "http://www.website.com/contact" and one for "http://www.website.com/index.php/contact" I get results for each? Surely this means that Google has indexed both pages. If a redirect is in place, shouldn't a search for "http://www.website.com/index.php/contact" return a search result for the pretty URL of "http://www.website.com/contact"?
Is there a way of stopping the index.php/ from appearing in URLs and therefore being indexed by Google?
Many thanks.
Thanks so much for your explanation. I've just got a couple of questions, the most important one to us being question 3.
1. What does adding the 'define URL_REWRITING_ALL as true' code to the config/site.php file do? Or more to the point, what has been happening since it's not there?
2. I have two URLs, website.com/contact and website.com/index.php/contact. You say that they are the same page with different addresses pointing to it. As I understand the file structure of websites, wouldn't the first URL go to a page in the root folder, and the second URL go to a page in an index.php folder?
3. If Google can't see the other URLs, how come when I do an exact searches for the string "http://www.website.com/contact" and one for "http://www.website.com/index.php/contact" I get results for each? Surely this means that Google has indexed both pages. If a redirect is in place, shouldn't a search for "http://www.website.com/index.php/contact" return a search result for the pretty URL of "http://www.website.com/contact"?
Is there a way of stopping the index.php/ from appearing in URLs and therefore being indexed by Google?
Many thanks.
I found the answer to the above problem here
http://www.concrete5.org/community/forums/customizing_c5/additional...
URL_REWRITING_ALL should sort out the problems your having in question 3...!
Lee
http://www.concrete5.org/community/forums/customizing_c5/additional...
URL_REWRITING_ALL should sort out the problems your having in question 3...!
Lee