You've probably come across mentions of 301, 302 or 307 redirects in the past and may well be unsure about exactly what should be used where.
The most basic redirect (and the one you'll use the most) is the 301 redirect. This is where your server tells the browser that the document has permanently moved and that the old address should be deleted and the new one used. You deploy this when you move a post or page to a new address or relocate your website entirely.
302, 303 and 307 redirects are for temporary changes. 302 redirects are specifically used for the rare occasions on which files are temporarily moved but will return to the previous location.
303 and 307 redirects rely on much the same principle as each other: preventing the user from refreshing or bookmarking a page that loads after a form submit. These redirects are most commonly used during credit card transactions. You won't need to use these protocols often as shopping cart plugins and e-commerce tools tend to handle them automatically.
So, when should you use a redirect on WordPress? Generally speaking, your domain and pages shouldn't be shifting around. However, sometimes you move on from an old project (or blog) to a new venture and want to direct users to your latest address. A 301 redirect helps streamline the process.
If you manage a larger site ' or a website that's been around for years ' chances are you have content that needs to be removed or consolidated. Instead of simply deleting the page ' thus potentially creating broken links or bookmarks ' use a redirect to your home page or location of updated content to keep things nice a clean.
Another reason to use redirects is for SEO purposes. A popular post will show up on search engine results and be referenced by other websites. If you want to remove or update it, the resulting broken links can hurt your page ranking. Using a redirect for the old URL will help users find the right content and keep Google happy to boot.
301 redirects often tend to create confusion for clients and consistently stir-up debate on best practices within the SEO industry. With this in mind, I will go on to clarify what a 301 redirect is, why (and when) you should be using 301 redirects, and how to set up 301 redirects for your website/s.
A 301 redirect is an essential tool, used to maintain the performance of a website by providing search engines and users with the latest/most relevant version of a web page in the all too common event that the original page has been moved or updated.
Put simply, a 301 redirect is a permanent redirect from one URL to another. For example, if we wanted to redirect www.example.com/old to www.example.com/new , we' would need to implement a 301 redirect from the old URL to the new one. Once this redirect has been implemented (which I will go on to explain), someone typing in www.example.com/old would land on www.example.com/new via the 301 redirect. The HTTP response status code 301 Moved Permanently should only be used for permanent redirection, meaning any links featuring the URL that the 301 Moved Permanently response is received for should be redirected to the new URL provided.
To better explain this, it is worth briefly running through the process of a how a web page is presented (or served) to a user in the first place. Whenever your website server 'serves' up a web page on your site to a visitor (either a human or search engine spider) it also serves a status code in the header. This information is 'served' before the actual page content to inform your browser (or search engine) what the page (or file) contains, be it an image, HTML, a PDF, Video etc. The server status code is designed to inform the visitor or search engine the 'status' of the page (file) in question.
To provide an example of this, I have taken a screenshot below of the information our server sends out when it receives a request for our home page.
301 status code example
This information is essential if you're moving content from one location to another, not least for search engines. If a search engine spider encounters a 301 redirect when crawling your website, it indicates to them the need to remove the old URL from their index and replace it with the new one instead. This means that the new page should eventually replace the old page in the search engines index ' and in the meantime the old URL will redirect human visitors to the new URL whenever anyone attempts to access it.
If you don't use a 301 redirect whenever you remove a page from your web server, search engines will be 'served' a 404 Not Found error response code ' which will result in the page in question being dropped from the search engine's index completely over time.
Why (and When) Should You Use 301 Redirects
It is important to remember that changing even the smallest aspect of a pages URL structure could cause said page to drop out of the search results entirely, which is why a 301 redirect is essential in maintaining the traffic/rankings that page may have been generating prior to the change in it's URL structure. Indeed, the examples I have provided so far centre around moving a page from one URL on your site to another. However, 301 redirects can be used in a multitude of other scenarios, including:
Moving to a new domain
Cleaning up dynamic URLs and redirecting them to shorter search engine friendly versions
Preventing duplicate content problems caused by www and non-www versions of your pages, along with other common causes of duplicate content
It often surprises me how many people don't set up a 301 redirect between the http:// and the http://www versions of their domain. It is a little known fact outside of the SEO industry that http://example.com and http://www.example.com are technically considered two different websites due to the addition of 'www' within one of the versions of the page. It is imperative, then, to ensure you have set up a 301 redirect between the http:// and the http://www versions of your website.
If you're planning on developing a new website in the future, then it's worth bearing in mind that 301 redirects are absolutely essential in a new website migration project, especially when moving to a new domain. It is highly likely that pages on your current site will have generated inbound links over the years, therefore you need to ensure you transfer this authority across to your new URL's if they are going to be changing due to a site redesign/domain migration. It might be reassuring at this point to reiterate the words of Google's head of webspam (Matt Cutts), who states that '301 redirects can carry an identical amount of pagerank as that passed on by a link'.
The plugin helps you handle with ease the page redirecting, besides having a whole bunch of features to help you in your work. These features include:
Redirect Rule Manager - define, activate, deactivate and manage redirection rules with ease
Wildcard support so you can define a rule to redirect a whole subcategory of pages to the specified internal or external link
Redirect using predefined status codes like: 301(best for SEO), 302, 303, 307, 403 or 404
Device selection supported - Mobile/Tablet/Desktop/Bot - apply different rules for them
User login type check - redirect if logged-in, not logged-in, administrator, not administrator
Support for adding shortcodes that will automatically redirect users from a page after a timeout, or will redirect users to a custom page, before leaving your page (exit strategy)
Redirect if user IP matches your rule
Redirect if user is from predefined country
Redirect if user has set a predefined language
Redirect if user uses a specific browser
Redirect only in a predefined time of the day
Log plugin activity and view logs in plugin control panel
Extended 404 Nearest Match Redirect - aid users who entered a misspelled URL
404 Page Not Found - redirect users who entered an inexisting link adress to a specific page
Random Post Generator - generate a link which will provide users a random link each time they click on it
Login Redirect - redirect your users to a predefined page, after they succesfully logged in
Logout Redirect - redirect your users to a predefined page, after they logged out
Attachment Page Redirect - redirect attachment pages to their parent page
Comment Redirect - redirect users who made their first comment on your website, to a predefined page
HTTP/HTTPS Redirection - choose if you want to redirect all your http protocol users to a more secure https protocol, or vice versa
Redirect www/non-www traffic - choose if you want to redirect all your traffic to the www version of your site, or vice versa
Maintenance Mode - redirect all your website traffic to a fully customizable (text, colors, background) and modern 'Maintenance Mode' or 'Coming Soon' page
Time Based Redirect - redirect your users only in a predefined time period (start date and time - end date and time)
Referrer Source based redirect - redirect only the traffic that is comming from a list of predefined referrers
User Name based redirect - redirect only a predefined set of users (user ban functionality)
OS Based redirect - redirect users based on their Operating System (Windows, Linux, iOS, Mobile, etc.)
Exit strategy functionality - show a 'Goodbye' page with social like/share buttons, to your leaving visitors
Full modern browser support - Google Chrome, Firefox, IE, Edge, Opera, Safari
Responsive design, fully mobile compatible
Most feature rich 'Page Redirection' Plugin for WordPress on the market!
To install this plugin, first, you'll need to install the plugin. The easiest method is to take the .zip file you've downloaded and upload it via Plugins > Add New > Upload Plugin in the WordPress Dashboard. Once the plugin is installed, be sure to Activate it.
Now that you've installed and activated the plugin, you'll see a new menu item created inside WordPress called 'Icarus All In One Page Redirect'. First thing first, let's head over to Settings > Icarus All In One Page Redirect and take a look at what options are available.
Refreshingly, Icarus All In One Page Redirect plugin has a super-simple settings screen. Let's look at first at the settings panel:
Here you can find the steps needed in configuring your plugin even if you have no HTML knowledge at all. You can find options for:
HINT! Don't forget to click the Save button every time you modified your settings, otherwise the modifications will be lost!
Icarus All In One Page Redirect Plugin Main Switch: Choose if you want to enable or disable the plugin. This acts like the "main switch" of this plugin.
Enable 'Extended 404 Nearest Match Redirect': Do you want to enable 'Extended 404 Nearest Match Redirect' feature? This will enable and extend WordPress's build in 'Nearest Match Redirect' feature, making it search, beside posts, also in categories, tags and pages.
Enable '404 Page Not Found' Redirect: Do you want to enable '404 Page' redirect feature? This will disable the build-in 404 error page feature and will redirect all users who entered an invalid link, to a predefined URL.
'404 Page Not Found' Redirect Link: The link where 404 not found page errors will be redirected. Here you can set a custom 'Page Not Found' page or simply just your home page.
Enable 'Random Post' Generator Redirect: Do you want to enable 'Random Post' feature? If you enable this feature, this plugin will generate a redirect rule adress, where, users will be given every time, at every visit, one random post. A great feature, for making your webpage visits more diverse. Note that this feature is not affected by the timing options set bellow.
Random Post Generator Link: The link of the random post generator. Enter here the address where the 'Random Post' will be found.
Enable 'Login Redirect': Do you want to enable 'Login Redirect' feature? This feature will redirect your users after a successful login to a predefined link.
'Login Redirect' Link: The link where users will be redirected after succesful login. Please note that this can be only an internal webpage, otherwise login feature will not function.
Enable 'Logout Redirect': Do you want to enable 'Logout Redirect' feature? This feature will redirect your users after a successful logout to a predefined link.
'Logout Redirect' Link: The link where users will be redirected after succesful logout. This can be any link from the web.
Enable 'Attachment Page Redirect': This feature makes attachment pages redirects (301 permanent redirect) to post parent if any. If not, redirects (302 temporal redirect) to home page. Note that this feature is not affected by the timing options set bellow.
Enable 'Comment Redirect': Do you want to enable 'Comment' feature? Redirect commenters who just made their first comment (and only the first comment on entire blog!) to a page of your choice. On this page, you could thank them for commenting and ask them to subscribe to your blog or like you on Facebook. Note that this feature is not affected by the timing options set bellow.
'Comment Redirect' Link: The link where users will be redirected after their first comment. This can be any link from the web.
'HTTP/HTTPS' Redirect: This will redirect all HTTP traffic to HTTPS, or vice versa. Warning! Enable this only if you have HTTPS protocol enabled on your site, otherwise this feature will break your site functionality!
'www/non-www' Redirect: This will redirect all WWW traffic to non-www, or vice versa. Warning! Enable this only if you knonw that the version you select is functional, otherwise this feature will break your site functionality!
Enable 'Maintenance Mode': Do you want to enable 'Maintenance Mode' feature? Maintenance mode page will be displayed only to users who are not logged in on your site or to users who do not have administrative priviledges. If you want to test it, you must log out from WordPress! This can also be configured as a 'Coming Soon' Page for future website release.
'Maintenance Mode' Page Title: The page title to be displayed on the maintenance mode page. This should be something like 'Maintance Mode' or 'Coming soon'.
'Maintenance Mode' Title Color: The color of the title of your 'Maintenance Mode' page. Select it with the provided color picker tool, according to you selected page style color bellow.
'Maintenance Mode' Page Text: The text to be displayed on the maintenance mode page. This should be something like 'We are currently under maintance. Don't forget to check back soon, we will wait you with cool new functionalities! Note that characters like ' or & will appear odd after you save the configuration, but it is normal (characters are escaped, but content on your site will appear normal).
'Maintenance Mode' Text Color: The color of the text of your 'Maintenance Mode' page. Select it with the provided color picker tool, according to you selected page style color bellow.
'Maintenance Mode' Page Style: The style of the maintenance mode page. This will change mainly the backgorund image.
Enable 'Time Based Redirect': Do you want to enable 'Time Based Redirect' feature? This feature will enable redirect features of this plugin (including 'Maintenance Mode'!) only inside the given time interval specified bellow.
Time Based Redirect Start Time: When to start redirecting? For this feature to work, both start time and end time MUST be set! Be sure you check the local server time before you set this rule.
Time Based Redirect End Time: When to end redirecting? For this feature to work, both start time and end time MUST be set! Be sure you check the local server time before you set this rule.
Enable 'Referrer Source' Filtering: Do you want to enable 'Referrer Source' feature? If you enable this, redirect will be made only if the source of your traffic corresponds with the link specified bellow.
'Referrer Source' Link: The link from where the traffic should come. Here you should specify the link from where your traffic comes which should be redirected to the custom urls defined in the rules bellow.
Enable 'User Name Redirect': Do you want to enable 'User Name Redirect' feature? This will redirect only the user defined in the textbox bellow. Note that if you want to include more referrer links, you shoul enter them all here, separated by comma.
'User Name Redirect' UserName: The username who to redirect. Define here the username of the user who should be redirected. Note that if you want to define more users, you should enter them all here, separated by comma.
Enable 'OS Based Redirect': Do you want to enable 'OS Based Redirect' feature? The redirect will take place only if the OS of the user corresponds with the OS defined bellow.
'OS Based Redirect' Selected OS: What OS to redirect? Define here the OS that should be redirected by the rules bellow.
Log Full Plugin Activity: Do you want to log full plugin activity? This should not be enabled only if instructed so by the plugin developer, or if you want to personally investigate the plugins functionality.
Local Server Time: The date and time on your server. You should define your timing rules with this knowledge in your mind.
Defined Rules Manager:
URL: The source URL from where you want to redirect your users. Note that this is the most important field in this table! Note that this field must contain only internal links (stating with /)!
*?: Do you want to enable usage of wildcards in this rule? You can lear about wildcards and their usage here.
Redirect: Where do you want to redirect your users? You can also leave this field blank, for 404 like status codes.
Del: Do you want to delete this rule?
Device: Select the device type where this rule is applied.
Login: Select user login related rules for your redirection.
IP: Insert the IP adress which you want to redirect.
Country: Choose users from which country should be redirected.
Language: Choose users with which language will be redirected. Note that the user must set explicitly their language in their system settings (default is English).
Browser Choose the browser version you want to redirect
Start: Choose the start time when you want to enable your redirect. Note that the time is related where your Server is located. Also, note that the time interval you set here will trigger daily.
End: Choose the end time when you want to disable your redirect. Note that the time is related where your Server is located. Also, note that the time interval you set here will trigger daily.
Log: Do you want to log when a redirect happens? You can see results in the 'View Logs' section of this plugin.
Active: Do you want to enable this plugin? You can deactivate any rule (you don't have to delete them to deactivate them).
Type: Choose the redirect type you want to apply for your rule. Recommended, for best SEO result is 301 redirect. Please do not select 403 or 404 statuses, unless you know what you are doing.
Save Rules To File: This button will save all your rules into a text file. This file can be sent to the plugin developer to aid you in debugging
The [icarus_redirect] Shortcode: This will redirect the users from the page you inserted this shortcode to the page you specified in the 'url' parameter, after a timeout of secods specified in the 'timeout' shortcode variable. Other possible parameters:
start_date="m/d/y" - ex: 1/30/2018
end_date="m/d/y" - ex: 1/30/2018
start_time="h:ia" - ex: 2:00pm
end_time="h:ia" - ex: 2:00pm
redirect_os="All Windows/All Apple/All Mac/All Linux/Windows 10/Windows 8.1/Windows 8/Windows 7/Windows Vista/Windows XP/Windows 2000/Windows ME/Windows 98/Windows 95/Windows 3.11/Mac OS X/Mac OS 9/Linux/Ubuntu/iPhone/iPod/iPad/Android/BlackBerry/Mobile"
The [icarus_redirect_link] Shortcode: This shortcode will display a link that will redirect, at random, to one of the urls defined. The link will be assigned to each user, based on his IP. The link will remain the same for a predefined refresh perios. You can also define the timeout for this interval (in hours). Usage example: [icarus_redirect_link text='Click here!' new_tab='yes' links='https://www.facebook.com/, https://www.google.com']. Parameters: new_tab='yes' - open link in a new tab, text='click here' - the text that will be displayed for the link, links='link1, link2' - a comma separated list of links where the redirect will be made.
The [icarus_exit_link] Shortcode: This shortcode will lead your visitors to a custom page, before they are automatically redirected (if you choose so) to an external or internal page of your choise. On the custom intermediary page they will have the possibility to like and share your page on different social networks. The intermediary page is fully customizable (text, colors, backgorund). Usage example: [icarus_exit_link url="facebook.com" text="Before you leave, why don't you like and share our site?" timeout="10" facebook="1" twitter="1" google="1" anchor="Go to Facebook"]
After you made your changes, you must save them in order to apply them to your webpage. Click on the Save button, and the settings will be saved.
Shortcodes in WordPress are little bits of code that allow you to do various things with little effort. They were introduced in WordPress 2.5, and the reason to introduce them was to allow people to execute code inside WordPress posts, pages, and widgets without writing any code directly. This allows you to embed files or create objects that would normally require a lot of code in just one single line. For example, a shortcode for embedding information about the user's browser looks like this:
Sometimes you may want to use the text of a shortcode in a post. To do this you have to escape it using double brackets. For example, if you want to redirect automatically users from a page, you can use icarus_exit_link shortcode to redirect users automatically after a timeout period on page, by using the following shortcode:
Shortcodes simplify the addition of features to a WordPress site. By using shortcodes the HTML and other markup is added dynamically directly into the post or page where the user wants them to appear.
Results: If everything is configures well, you can see the results of this plugin by navigating to your website and accessing a redirected link. You will be redirected to the redirectio target of your choise (depending on how you configured it).
You can also take advantage of the 'Maintenance Mode' feature of this plugin.
Add a maintenance page to your blog that lets visitors know your blog is down for maintenance, or add a coming soon page for a new website. User with admin rights gets full access to the blog including the front end.
Activate this feature and your blog is in maintenance-mode, works and only registered users with enough rights can see the front end.
Here are some examples of possible maintenance mode pages:
NOTE! If the maintenance mode page is not showing for you, check if you are logged out from WordPress (it shows only to logged out visitors, or to logged in visitors who are not administrators).
Icarus All In One Page Redirect plugin is a simple, yet powerful tool you can use to manage page redirects on your website. It can protect you from the hassle caused by broken and duplicated content links. The setup and settings of the plugin couldn't have been easier. Now, let's go and enjoy the results of this great plugin! Have fun using it!