Published November 18, 2008 -
RSS/XML Feed 
A JavaScript redirect is a piece of JavaScript code that is used to automatically transfer a visitor from a landing page to a different target page. Although there may be legitimate reasons to transfer visitors and users to a different URL, generally a JavaScript redirect is employed as a sneaky method to trick search engines and direct user traffic to a website completely unrelated to a search.
JavaScript redirects and cloaking considered “black hat”
A JavaScript redirect falls under the category of “cloaking,” which is a practice of serving different results to users through search engine results. Besides redirection, another example of cloaking could be providing a web page with HTML text to a search engine, while giving a page full of images or Flash content to a user’s browser.
Web page elements like JavaScript, Flash, or other rich media files generally cannot be crawled effectively by search engines. Thus, when a page containing JavaScript is indexed by a search engine, any links hidden by JavaScript coding may not be followed by the search engine. Because of this fact, many SEO firms and underhanded webmasters may employ these “sneaky” methods to fill a web page with common search terms in order to fool a search engine and redirect the visitor to an unrelated website.
Cloaking is frowned upon by search engines. In fact, any practice of purposely deceiving a search engine in order to serve different results to a user is cause for removal from a search engine’s index. Thus, SEO companies that use software programs that auto-generate doorway web pages with search keywords for the simple purpose of redirecting a visitor with sneaky JavaScript will eventually be discovered and flagged for removal.
Yet another reason to avoid JavaScript redirection is that many users turn off the JavaScript function on their browsers. Whether your intention to redirect is legitimate or sneaky, a non-java functioning browser will simply display whatever text is on the web page, as well as the JavaScript code, and not perform the redirect.
Applicable Reasons to Redirect
There are cases, however, where there are legitimate reasons for wanting to redirect a user to a different web page:
· URL misspelling – Some users may commonly misspell a URL. Many big websites may purchase extra domains with these common misspellings and use them as a simple landing page to redirect to the actual domain. An example may be when a user types “gooogle.com” or even “googel.com” in a URL window. Despite the misspelling, users are automatically redirected to the actual “google.com” domain.
· New domain – Sometimes it is necessary for a business or website to change its name. When that results in a new domain name, it is acceptable to continue using the old domain as a redirect page to the new domain. For instance, when two businesses merge, it is likely they will use only one main domain as a consolidated website and use the other as a redirect page.
· Forwarding a .net to .com – Oftentimes a domain is purchased by a business as a .net or .biz when the more common .com is unavailable. If at some point the .com domain becomes available or is purchased by the business, they could continue using a .net as a redirect to the new domain.
What You Should Do
If you need to employ a redirect on a particular web page, remember that sneaky methods are not recommended. Even though JavaScript is an acceptable method to redirect users, search engines are becoming savvier, looking for hidden text and sneaky redirects. Google posts this basic principal on their webmaster guidelines:
Make pages primarily for users, not for search engines. Don't deceive your users or present different content to search engines than you display to users, which is commonly referred to as "cloaking."
The best way to create a redirect without looking potentially sneaky is to use an .htaccess file, such as a 301 Permanent Redirect or 302 Temporary Redirect. These codes are the most efficient and search engine friendly methods, and they will preserve your web page ranking as well. Simply create one of the following codes in a text editor and save it as a .htaccess file:
redirect 301 /filename.ext http://www.domain.tld/newfilename.ext # permanent redirect
redirect 302 /filename.ext http://www.domain.tld/newfilename.ext # temp redirect
These codes create no delay in a redirect since a server checks first for an .htaccess file. If it finds one, a browser is sent directly to the new site without loading the old page.
Redirecting user traffic from one web site to another is a common practice. If the purpose of redirect is simple and legitimate, there is no reason to use JavaScript coding. An .htaccess file works perfectly fine. Remember that cloaking and using doorway redirect web pages are considered deceptive, so only employ a redirect when absolutely necessary.
Resources:
Read Related Articles About How to Optimize Your Site
- SEO Site Structure Principles
Learn the important guidelines for properly structuring your site for search engines. - Using Silo Structure or Maximum On Page SEO Effectiveness
A common problem for on page optimization is keeping the content within your website organized so that the search engines can make a clear distinction as to the theme or your pages. - Speed Up Your Website to Increase Traffic
Learn how speeding up your website can drive traffic and sales. Also learn common methods for decreasing page loading times. - How to Optimize Your Meta-titles, Descriptions and Keywords
The term "meta data" is used to describe information within the coding of your site that the search engines use to index your site. The search engine companies send programs called "spiders" out to gather information about your site and determine how to display it in the search results page. - How to Use Effective Meta Tags
Learn how to effectively use meta-tags to increase your search engine visibilty and referral traffic. - How Using GZIP Compression Helps Your Site's SEO
You might have heard some talk about how compressing your web pages helps with your site's SEO, but how does it help and how can you use it on your site? This article will provide you with some details on what file compression is and why it�s essential to the process of optimizing your site. - Alt Tags and Other Image Optimization Tools
Having an attractive site is important for making a good first impression on your visitors. This is why it’s crucial that you use great looking images to accompany your site copy and to communicate the overall “personality” of your company. - Traffic Conversion Strategies
Learn several great strategies for improving conversions on your website. - Static Links vs. Dynamic Links: Which Are Best for SEO?
Learn about the pros and cons behind static links and dynamic links, as well as which one is best for your SEO efforts. - Correct Your URL Canonicalization
Learn about URL Canonicalization, what it is, why it is important, and how to address this for your website. - How to Turn Your Website into an Online Community
How to build an interactive forum for optimizing and promoting your site - How Analytics Tools Can Guide Your SEO Efforts
Learn how and which analytics tools can improve your SEO efforts. - Split Testing to Improve Your Site's Performance
Learn how split testing can greatly improve conversions and user behaviors on your site. - Why You Need A Sitemap Protocol As Part of Your SEO
Learn about how powerful a Sitemap Protocol is in enhancing your website's search engine optimization. - SEO for Wordpress: Optimizing Your Blog With Wordpress Plug ins
A simple step by step game plan for boosting the SEO of your Wordpress blog, optimizing traffic flow and increasing visitor interactions. - The Importance of Avoiding the Use of Nested Tables
Learn about why you should avoid utilizing nested tables in your web pages from both SEO and browsing perspectives. - The Importance of Avoiding Keyword Stuffing
Learn about the dangers of keyword stuffing, how to detect it, and how you should correctly approach keyword usage. - Using Hidden Comments to Improperly Stuff Keywords
Learn how hidden comments can be improperly used to stuff keywords for search engine purposes. - Are Doorway Pages an Effective SEO Technique?
Learn about doorway pages, how they work, and if they are an effective SEO technique.
All Categories: