Posts Tagged ‘indexing’

How to fix / Resolve WordPress Blog /comments/feed/ redirect loop

Wednesday, July 7th, 2010

I have recently figured out that accessing https://www.pc-freak.net/blog/comments/feed/ would end up in a Redirect Loop I’m using feedburner to manage my blog feeds so I assume this redirect loop is probably caused by the use of feedburner

Since this kind of redirect loop is definitely not professional and has a negative influence on search engine indexing (the SEO), I have playeda bit until I finally found a way to resolve the /comments/feed/ redirect loop.
In order to resolve the redirect loop issue it appeared to be really easy.

To fix the issue Navigate to:

Tools -> Redirection

Therein add a Source URL to redirect to a Target URL:
For instance:

Source URL: https://www.pc-freak.net/blog/comments/feed/

Target URL: https://www.pc-freak.net/blog/feed/

Press the Add Redirection button to confirm the redirection.
That’s all your problems with feeds redirect loop while the /comments/feed/ url is accessed should be resolved.

Script to Automatically change current MySQL server in wp-config.php to another MySQL host to minimize WordPress and Joomla downtimes

Friday, July 20th, 2012

I'm running a two servers for a couple of home hosted websites. One of the servers is serving as Apache host1 and has configured MySQL running on it and the second is used just for database host2 – (has another MySQL configured on it).
The MySQL servers are not configured to run as a MySQL MASTER and MySQL SLAVE (no mysql replication), however periodically (daily), I have a tiny shell script that is actualizing the data from the active SQL host2 server to host1.

Sometimes due to electricity problems or CPU overheats the active MySQL host at host2 gets stoned and stops working causing the 2 WordPress based websites and One joomla site inaccessible.
Until I manually get to the machine and restart host2 the 3 sites are down from the net and as you can imagine this has a very negative impact on the existing website indexing (PageRank) in Google.

When I'm at home, this is not a problem as I have physical access to the servers and if somethings gets messy I fix it quickly. The problem comes, whether I'm travelling or in another city far from home and there is no-one at home to give the hanged host hard reboot ….

Lately the problems with hang-ups of host2 happaned 3 times or so for 2 weeks, as a result the websites were inaccessible for hours and since there is nobody to reboot the server for hours; the websites keep hanging until the DB host is restarted ;;;;

To work-around this I came with the idea to write a tiny shell script to check if host2 is ping-able in order to assure the Database host is not down and then if script determines host2 (mysql) host is down it changes wp-config.php (set to use host2) to a wp-config.php (which I have beforehand configured to use) host1.

Using the script is a temporary solution, since I have to actually find the real hang-up causing troubles, but at least it saves me long downtimes. Here is a download link to the script I called change_blog_db.sh .
I've configured the script to be run on the Apache node (host1) via a crontab calling the script every 10 minutes, here is the crontab:
 

*/10 * * * * /usr/sbin/change_blog_db.sh > /dev/null 2>&1

The script is written in a way so if it determins host2 is reachable a copy of wp-config.php and Joomla's configuration.php tuned to use host2 is copied over the file config originals. In order to use the script one has to configured the head variables script section, e.g.:

host_to_ping='192.168.0.2';
blog_dir='/var/www/blog';
blog_dir2='/var/www/blog1';blog_dir3='/var/www/joomla';
notify_mail='hipo@www.pc-freak.net';
wp_config_orig='wp-config.php';
wp_config_localhost='wp-config-localhost.php';
wp_config_other_host='wp-config-192.168.0.2.php';
joomla_config_orig='configuration.php';
joomla_config_other_host='configuration-192.168.0.2.php';

You will have to manually prepare;;;

wp-config-localhost.php, wp-config-192.168.0.2.php ,configuration-192.168.0.2.php, wp-config-localhost.php to be existing files configured to with proper host1 and host2 IP addresses.
Hope the script will be useful to others, experiencing database downtimes with WordPress or Joomla installs.
 

How to set custom page titles in Joomla 1.5 manually for better SEO

Thursday, June 2nd, 2011

he Joomla CMS default behaviour is that Page titles of the Joomla Articles created are always set to the page Title assigned to each of the articles.

This is not very good behaviour in terms of SEO, as the page title of each link on the main page is different and there is no continuous repeating pattern in all of the joomla pages.
Everyone that has even basic idea of SEO knows that page titles are very important weight factor to make indexing inside Search Engines succesful.

There is a well know SEO rule which is the more reoccuring pattern one has in his page titles, more is stressed on the keywords contained in the title.
As I said for some weird reason Joomla has no common page Title for all my the created Article pages linked via the Main Menu*

Thus in order to improve this bad default Joomla SEO behaviour one has to change the default auto assigned titles for created pages, manually.

Two things are necessery to change each of the joomla already existing TITLES.

1. Go to each of the pages (.e.g. Home etc.) and change the Parameters System Page Title settings

After logging in with administrator in Joomla, navigate to Menus -> Main Menu*

Further on choose a menu item from all your existing items, let’s say Home and click on it.

On the left side below the Save, Apply, Close and Help buttons you will notice the menus:

Parameters (Basic), Parameters (Component), Parameters (System)

When clicked on Parameters (System) a submenu will appear:
Joomla Main Menu Parameters System Page Title better SEO

Above is a screenshot of the up-described Parameters (System) [Page Title] location

You need to change where it reads on the screenshot CHANGE THE TITLE HERE !!!!!! 😉

After entering your own desired page title go and save the article via the Apply or Save button (also visible in the screenshot).

Now as the custom Page Title is set, next step is to enable the custom Page Title for the respective Article in Article Manager

2. Enable custom Page Title for created pages in Joomla

Go to the Article Manager by following the menus:

Content -> Article Manager

Select the Article of which you want to change the Page Title to some custom text and click over it.

As the article opens for edit in an html editor, navigate to Parameters (Advanced) tab and therein change the Show Title from default setting value:
Use Global
to
Yes

Once again use the Save or Apply button to confirm the new settings and open your website in a new tab, try to browse and check the title of the articles parameters just edited. It should show up in the Title (page heading) the custom input Title.

Now repeat the same procedure for all pages (Articles), existing in Joomla to attune the Page Titles to some Google friendly strings and enjoy the better Search engine indexing which should likely follow.

Few little SEO tips on indexing a website / webpage in a better fashion (Through usage of robots.txt and sitemap.xml)

Monday, December 28th, 2009

As I’ve mentioned in my previous post it’s of vital value to have your website W3C compliant.
I’m trying to learn something more about SEO this days and therefore I found a website dedicated to
Search Engine Optimization discussing the importance of having the robots.txt file in each and every hosted
domain as well as the huge importance of generating sitemap for every web page out there in the Net.
More about robots.txt can be learned fromabout robots.txt’s website
Here is a straigh forward robots.txt I choose to use to enable indexing of website without any restrictions
# Allow allUser-agent: *Disallow: It was kinda of handy for me to learn more about sitemaps on sitemaps.org
In few words sitemaps are used to better map content on a website as every SEO out there knows.
Here is a sample sitemap from the sitemap.xml I’ve generated for www.pc-freak.net’s entry page
https://www.pc-freak.net// 2009-12-27T15:28:49+00:00 1.00 There are plenty of both online and standalone sitemap.xml generators on the net.
I’ve choosed to use an online service to generate my sitemap.xml after which I modified
the entries in the generated file manually.
I’ve also given a try to google-sitemapgen from the bsd port tree, howeverI wasn’t able to use that soft to generate any sitemaps.
One of the most used and probably honoured project on sitemap generating is Google’s sitemap Generator, checkin Google for further info.
Another handy tip that helps indexing in search engines is including:
Sitemap: https://www.pc-freak.net//sitemap.xmlin the robots.txt file, so after inclusion robots.txtwould look alike.# Allow allUser-agent: *Disallow:Sitemap: https://www.pc-freak.net//sitemap.xml