Joomla SEO remove index.php through canonical? - joomla

I've run my Joomla 1.5 site through the Google Webmaster Tools, it's telling me my site has multiple pages with double title-tags.
Here's an example:
http://www.example.com/section/page
http://www.example.com/index.php/section/page
I'm using the default .htaccess-file from Joomla 1.5, what should I add to prevent Google to see things like this?
Perhaps a canonical-tag, but a rewrite would be mostly loved for, right?
Thanks in advance!

Either will work.
Either:
An htaccess instruction following the correct logic with a 301 redirect from index.php to clean, or
A dynamic canonical tag placed on each page template (generally in Joomla this will fix it, as placing the code on one template will (by default) place it on both the / and /index.php pages.

Related

Can I create a 301 redirect from www.xcompany.com to shop.xcompany.com?

I work for xcompany. I am wondering if it is possible to set up a 301 redirect from our site http://shop.xcompany.com/ to our site http://www.xcompany.com/ and if possible, what would the rewrite rules be?
The old page that existed on the former URL has been removed from the site and a similar page has been created on the latter URL and we need to make sure any traffic is directed to the new page.
Thanks!!
RewriteRule ^old/URL/path$ http://example.com/new/path [R=301,L]
To redirect from oldsite.com to newsite.com you can use the following redirect in /oldsite/.htaccess
Redirect 301 / http://newsite.com/
Redirecting one domain to another domain is very much easier than before only if you are well familiar with CMSs like WordPress. There are plenty of redirect plug-ins available in WordPress that make our efforts easier and quicker.
301 redirection must be done if you have made any changes to the older URL and it will give link juices without losing its ranking, backlinks, and all others.
You need not worry about anything. Redirect your older one to new one. Then Google webmaster tool will give a report if your new site causes crawling errors. Hope it'd be helpful.

Revamped Joomla site to Google search engine

I am about to upload a revamped site of Joomla (update from 1.5 to 2.5 + changes).
I currently have a test bed sub-domain that I am currently working on.
In few days I am about to do the swap and replace the old site with the new one.
I am worrying about Search Engines and specifically Google.
The site currently has a very good rank (appears 2nd in the search), what actions do I have to take in order to be updated and preserve the rank? (except submitting the new sitemap I guess).
It's not a difficult task but because I don't have the option to be wrong or mistakes to be done I an asking for a more "expert" advice.
Thanks in advance.
The Upgraded version of the site have any URL changes like images or pages Then you have to take the things more carefully and redirect all old URLs to the New one with 301 redirect.
Otherwise Google will consider those pages are not exists and it will loose page rank.
Also this question is not well suits for this platform, Its better to ask on Webmaster.
In this way you will not loose old page urls ranks.
For making old non-existing URLs to new corresponding url,
on your htaccess file.
RewriteEngine on
RewriteRule your_old_url_without_domain http://www.domain.com/new_corresponding_url [R=301,L]
You're using Nginx Server so the htaccess doesn't work for try to use Nginx htaccess converter.
for more details
Hope it make sense..

Renaming index.php and accessing other pages in Joomla

I have to do some modifications online on my website, and I don't want the users to see those pages. So I renamed index.php to index_orig.php and I put another index.html that show a message (WebSite under construction) for my users.
My problem is that I want to access online to the rest of my pages to check the modifications until satisfaction, but when I try to access the rest of the pages by their whole URL (404 error is shown).
Example : www.mywebsite.com/floder1/pagetarget.php.
Put back index.php.
In your global configuration, set the site to offline and put up a message and a logo etc (assuming you are on 2.5 or 3). You'll be able to login and see the site.
Please keep in mind that in a database driven cms there are not pages in the way that you would think of them in a static html site. Everything gets pushed into the index.php of your template file.
Update the directory default document on whatever webserver you are using. Also update any rewrite rules that may be pointing to index.php

WordPress File Extensions

I am converting a Frankenstein monster of a website into a Wordpress. The first challenge I am facing is to keep our old URLs for Google. this site has several .PHP pages and several HTML pages.
Our Google ranking is high in several key search terms. So it is important to me that page addresses remain the same. So far I cannot find a plugin which would allow my Wordpress site to have both .HTML and .PHP permalinks.
I am familiar with mod_rewrite() and have used it before, but when I inserted a rewrite rule into the existing Wordpress .htacces file, it broke the routing altogether.
I would greatly appreciate any input from your Wordpress gurus :)
You need to do 301 redirect and here's an example .htaccess.
Redirect 301 /oldpage2.html http://www.yoursite.com/folder/

URL rewriting in joomla

I need to rewrite url in joomla. But the url should not be showing "index.php" and no numbers (0-9) as well.
1st condition:
The url cannot be " http://www.abc.com/index.php/components/article" rather than it should be "http://www.abc.com/components/article".
2nd condition:
the url cannot be "http://www.abc.com/components/article/9" where it contains 9 number .
How can this be done?
Joomla comes with htaccess.txt, and the option to rewrite urls. So you have to first change the htaccess.txt file to .htaccess on the server, then login and in the configuration settings change SEF to on, and use .htaccess to on.
In support of the answers from gnomeontherun and Hennie. You have some control over how the url is made up by joomla, through the menu structure and the alias for the each menu.
Sometimes it's worth creating menu items even if you don't show them on a menu on your site.
e.g.
Menu structure:
Home
-Latest News *(Could be a category blog view)*
--News article 1 *(Link to article but this level need not be shown on menu)*
--News article 2 *(Link to article but this level need not be shown on menu)*
url should look like:
/latest-news *(for the blog view)*
/latest-news/news-article-1 *(for the article view)*
If there is no menu item which relates to an article, Joomla makes up the url itself using category+id/article-alias+id etc. If it does find a menu item, it will use the structure of the menu instead.
Joomla uses the alias of the menus for the actual content:
i.e. menu-alias-level1/menu-alias-level2/news-article-1
Using this method from the beginning will allow you to keep your urls consistent whether they are accessed through the blog page route or directly. This will help with your SEO.
Of course it can be a pain to create a menu item for every article but I know some Joomla guys who swear by it and will do it even for thousands of pages...
for the index part ...
Perhaps this will work for you too
RewriteRule ^index\.php$ http://www.yourdomain.com/ [R=301,L]
or
Redirect 301 /index.php http://www.yourdomain.com
To get rid of the 'index.php':
Rename the htaccess.txt file to .htaccess
In the backend, turn on SEF URLs and URL rewrite
Joomla will then show your article using something like "http://www.example.com/category/article/9", unless you assign a menu item to that article. There is no need to show that menu, so you can create new menu, call it 'hidden' (or any other valid name) and do not publish the module.
A more comfortable option is to use one of the many SEF components, which make it much easier to manage the URLs. Most if them additionally provide meta data control.

Resources