Batch processing robots meta tags

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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
vincebodie
Joomla! Intern
Joomla! Intern
Posts: 94
Joined: Thu Sep 02, 2010 3:57 am

Batch processing robots meta tags

Post by vincebodie » Tue Nov 23, 2021 7:20 pm

I want to change all articles in the /media-content/ directory of our site from "index, follow" to "noindex, nofollow". Is there a quick way to do this?

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 7237
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Batch processing robots meta tags

Post by AMurray » Tue Nov 23, 2021 10:15 pm

I think this might help: https://extensions.joomla.org/extension/db-replacer/

The alternative would be to work directly in the database (phpMyAdmin).

I believe you would need to use the "Replace()" command in MySQL. Don't quote me on that, I'm no expert. https://www.w3schools.com/SQL/func_sqls ... eplace.asp (search Google for more info on SQL commands).

Your articles are contained in the database, not in any physical folder, you'd need to be careful which ones you're replacing if not doing all of them.
Regards - A Murray

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11197
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Batch processing robots meta tags

Post by sozzled » Tue Nov 23, 2021 10:28 pm

Simple: add the following line to the file robots.txt

Code: Select all

Disallow: /media-content/
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

vincebodie
Joomla! Intern
Joomla! Intern
Posts: 94
Joined: Thu Sep 02, 2010 3:57 am

Re: Batch processing robots meta tags

Post by vincebodie » Tue Nov 23, 2021 10:34 pm

AMurray wrote:
Tue Nov 23, 2021 10:15 pm
I think this might help: https://extensions.joomla.org/extension/db-replacer/

The alternative would be to work directly in the database (phpMyAdmin).

I believe you would need to use the "Replace()" command in MySQL. Don't quote me on that, I'm no expert. https://www.w3schools.com/SQL/func_sqls ... eplace.asp (search Google for more info on SQL commands).

Your articles are contained in the database, not in any physical folder, you'd need to be careful which ones you're replacing if not doing all of them.
Thanks for the reply. I have been using the free version of DB Replacer for a while now and I see no way to select only the articles in the 'media-content' category. It looks like the Pro version may be able to do it, so I will ask the developers before purchasing it. In the Pro description it says:

"Limit search by WHERE
Use an extra WHERE field to limit the rows in which to search and replace"


Assuming WHERE can include article categories, that could work.

vincebodie
Joomla! Intern
Joomla! Intern
Posts: 94
Joined: Thu Sep 02, 2010 3:57 am

Re: Batch processing robots meta tags

Post by vincebodie » Tue Nov 23, 2021 10:36 pm

sozzled wrote:
Tue Nov 23, 2021 10:28 pm
Simple: add the following line to the file robots.txt

Code: Select all

Disallow: /media-content/
https://joomlaseo.com/checklist/robots- ... ch-engines


Post Reply

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