Tuesday 3 February 2015

How to Setup Custom Redirects

Blogger Custom Redirects

Blogs change over time -- posts and pages are added and deleted. However, it can be hard to keep track of all the links that point to URLs that no longer exist, especially if there are a lot of links to your blog from other blogs and websites. The Custom Redirects feature allows you to take an old URL, and point it to a new one.


For example:
Let’s say you have a recipe blog, and one of your most popular posts is about banana pancakes. A year or so later, you decide you only want your blog to be about gluten-free recipes, so you go through and delete all the posts with recipes involving gluten (including the popular recipe about banana pancakes). However, since your recipe was popular, other blogs or sites had links pointing to your post. After you remove the recipe, anyone trying to access the page receives a “Page Not Found - 404” error.
With Custom Redirects, you can enter the old URL that used to lead to the banana pancake post, and redirect it to another URL (perhaps the address of a recent post you wrote using gluten-free flour and milk).
To enter a Custom Redirect, go to Settings | Search Preferences and click Edit next to "Custom Redirects." Enter the old URL in the "Source" field, and the new URL in the "Destination" field. Click Save changes, and you’re done! To add more redirects, select new redirect.

Joomla Redirect:

Choose Right Type of Server:

If you are opting Joomla then it is recommended you to choose Apache Server instead of IIS server because it is best suited for Linux servers also supports all the plugins and components which you install. Everyone may not face problem with IIS servers but any how you will face one or the other problems with IIS servers. Therefore, I suggest you to install Joomla on Apache server with mod_rewrite installed.

Use “www” or “non-www”:

Redirect your Joomla site from “www.yourdomain.com” to “yourdomain.com” or vice versa because if your domain is not redirected then search engine will consider “www.yourdomain.com/example1″ and “yourdomain.com/example1″ as two pages and duplicate content issue will arise which dilutes your page rank and also link juice.
To redirect “non-www” to “www” use:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Joomla!, unlike Wordpress, doesn't automatically redirect your website to either the www. or non-www. version. This obviously poses a canonical problem, which you need to correct manually via your .htaccess file.
To redirect from non-www. to www. add the following code to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$
Error! Hyperlink reference not valid. [R=301,L]
Alternatively, you can redirect to non-www. By adding this code instead:
RewriteEngine On
RewriteCond %{HTTP_HOST} www.yourwebsitehere.com
RewriteRule (.*) http://yourwebsitehere.com/$1 [R=301,L]

Redirect www to http://

Search engines see the URLs www.example.com and http://example.com as two separate websites causing your page rank to be split. You also run the risk of Google considering the two websites duplicate content. The way to avoid this in Joomla is to redirect the non-www to www. This is done in the .htaccesss file.

Redirect Broken Links

Just go to your webmaster tools account and from Health > Crawl Errors, find out if there are any 404 errors on your blog. If there are any such errors, simply use a 301 to redirect them to the correct locations on your blog.
Go to Settings > Errors and redirections > Custom Redirects.

Apart from these basic settings, make sure you’re optimizing your blog post too. Here are some tips from my end.

No comments: