How to restrict Google to access non-SEO URLs?

Discuss Search Engine Optimization in relation to Joomla! 3.x. This forum will also have discussions on SEF/SEO Joomla! 3.x extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
persmash
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Jun 28, 2009 1:36 pm

How to restrict Google to access non-SEO URLs?

Post by persmash » Sat May 04, 2013 8:32 pm

Hi,

I've converted all my URLs to SEO friendly URLs.
But I want to restict google to access my non-seo friendly URLs.
As an example, you can access http://www.example.com/article-1 with http://www.example.com/index2.php?articleid=4....

And one more question, I'm not using user registration or any user related things, but google is able to access these links even they are not in the sitemap.

I wish that I'm clear to explain what I need.

Thanks in advance...

almooj-craig
Joomla! Guru
Joomla! Guru
Posts: 500
Joined: Mon Aug 11, 2008 3:05 pm

Re: How to restrict Google to access non-SEO URLs?

Post by almooj-craig » Mon May 06, 2013 3:22 pm

Persmash,

It sounds like those were old links that were used on your site before you converted to SEO links. If there are not that many, say 50 or less, then I would suggest that you use mod_rewrite to send a 301 redirect to the new url. Eventually after Google receives many 301s they will stop trying to access the old urls.

I don't use Joomla 3.0 so I can't give direct code advise but, if you have a huge amount of old urls that need to be redirected then you may need to rewrite the com_content component so that it sends a 301 whenever someone accesses an article using a non SEO link.

Craig

persmash
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Jun 28, 2009 1:36 pm

Re: How to restrict Google to access non-SEO URLs?

Post by persmash » Tue May 07, 2013 12:11 pm

Can you give me an example for this suggestion. I think, this suggestion will totaly fix my requisitions.

almooj-craig
Joomla! Guru
Joomla! Guru
Posts: 500
Joined: Mon Aug 11, 2008 3:05 pm

Re: How to restrict Google to access non-SEO URLs?

Post by almooj-craig » Tue May 07, 2013 2:14 pm

Just review your server logs to find out the urls that Google is using to access your site, most likely they are the old urls.

If you post an old url and then the corresponding new seo url I'll write one mod_rewrite 301 for your .htaccess and then you can do the rest of them.

Craig

persmash
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Jun 28, 2009 1:36 pm

Re: How to restrict Google to access non-SEO URLs?

Post by persmash » Tue May 07, 2013 4:55 pm

almooj-craig wrote:Just review your server logs to find out the urls that Google is using to access your site, most likely they are the old urls.

If you post an old url and then the corresponding new seo url I'll write one mod_rewrite 301 for your .htaccess and then you can do the rest of them.

Craig
Can't we do this for all com_comtent?
For example;
Old one: http://www.mysite.com/index.php?option= ... Itemid=113
New one: http://www.mysite.com/article-1

almooj-craig
Joomla! Guru
Joomla! Guru
Posts: 500
Joined: Mon Aug 11, 2008 3:05 pm

Re: How to restrict Google to access non-SEO URLs?

Post by almooj-craig » Tue May 07, 2013 11:55 pm

If you are making seo urls are you sure that you want to use article-1. It would be better to use more descriptive keywords.

Here is the mod_rewrite for your old to new example.

Code: Select all

RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=76&Itemid=113$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/article-1? [R=301,L]
Since you don't have that many old urls to rewrite just enter a new RewriteCond and RewriteRule for each old url. Then after 6 months or so you can most likely remove them or comment them out.

persmash
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Jun 28, 2009 1:36 pm

Re: How to restrict Google to access non-SEO URLs?

Post by persmash » Wed May 08, 2013 7:03 am

almooj-craig wrote:If you are making seo urls are you sure that you want to use article-1. It would be better to use more descriptive keywords.

Here is the mod_rewrite for your old to new example.

Code: Select all

RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=76&Itemid=113$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/article-1? [R=301,L]
Since you don't have that many old urls to rewrite just enter a new RewriteCond and RewriteRule for each old url. Then after 6 months or so you can most likely remove them or comment them out.
It was just as an example, I'm using header of the article. I mean www.abc.com/header-of-the-artlicle

MarkHerry
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue May 07, 2013 2:09 pm

Re: How to restrict Google to access non-SEO URLs?

Post by MarkHerry » Wed May 08, 2013 2:19 pm

I appreciate these posts and these are very useful for me because i learned something new about restrict Google to access non SEO URL's . Thanks for wonderful idea.


Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 3.x”