Javascript redirects harmful for SEO?
-
Hi Mozzers,
A website deals with some javascript redirects. After some research, It came clear a normal 301 is the best option, but javascript redirects can be useful if you don't have access to a website' server.
Does anyone have experience with javascript redirects? Can they be harmful in any point of SEO?
I would love to hear your thoughts!
-
Hi Paul,
This definitely helps!
Thanks for your answers and the link to the blogpost!
Kind regards,
Jens -
Just to be clear here - you don't need access to the Apache webserver to manage proper redirects. As long as you have folder access to the website (FTP, command line etc) you can generate an htaccess file that will take care of it. (And not having this access means you basically have no real control of the website.)
P.
-
Doing redirects in JavaScript is definitely a "better than nothing" solution, rather than anything that should be recommended. It means placing your trust in something in that is supposed to work work, as opposed to something that definitely will.
I'd make sure there really was no way to do the redirects properly first, before falling back to the last-ditch solution.
Here's a test from a year ago that showed ranking authority was passing through JS redirects, but note all the caveats they include (especially that Bing didn't handle this at all at the time).
https://www.branded3.com/blog/seo-javascript-redirects-evidence-pass-pagerank/Hope that helps?
Paul
-
Hi Roman,
That's basically it. When people don't have access to the Cpanel, Apache or another web server, they can use javascript redirects. But do they pass for example equal link juice as a 301? Or are they any disadvantages on using javascript redirects? So as you said, I would like to hear an opinion on javascript redirects vs apache.
Thanks,
Jens -
Let me understand, you want an opinion of "javascript redirects" vs "apache". So you have access to root file bust you don't have access to the Cpanel or Apache or another web server.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
I have a question about the impact of a root domain redirect on site-wide redirects and slugs.
I have a question about the impact (if any) of site-wide redirects for DNS/hosting change purposes. I am preparing to redirect the domain for a site I manage from https://siteImanage.com to https://www.siteImanage.com. Traffic to the site currently redirects in reverse, from https://www.siteImanage.com to https://siteImanage.com. Based on my research, I understand that making this change should not affect the site’s excellent SEO as long as my canonical tags are updated and a 301 redirect is in place. But I wanted to make sure there wasn’t a potential consequence of this switch I’m not considering. Because this redirect lives at the root of all the site’s slugs and existing redirects, will it technically produce a redirect chain or a redirect loop? If it does, is that problematic? Thanks for your input!
Technical SEO | | mollykathariner_ms0 -
SEO Issues
Hi, We have created a moving cost calculator tools and other moving company can added this tools their website. This is the code: [ <iframe src="http: www.enakliyat.com.tr="" fiyat-hesapla.aspx"="" height="554" width="400" frameborder="0" scrolling="no" style="border:none;"> ] when the other moving company added this code their websites, tool also works on the site and the tool make the referrals traffic our site.** Is it right using this method?**</iframe src="http:> http://www.enakliyat.com.tr/evden-eve-nakliyat-fiyatlari-hesaplama/ here is the tool
Technical SEO | | iskq0 -
301 redirects
Hello. Our site was recently rebuilt, and we switched from using index.php in all the urls to not using it at all. We also changed the names of many of our pages. So the urls have been renamed from "example.com/index.php/old_page_name/" to "example.com/new-page-name/". While we were at it, we changed from "_" to "-" as our word separators in the urls. In the .htaccess file, we have a small block of code that strips out "index.php/" from all requests. This code redirects a request for "example.com/index.php/old_page_name/" to "example.com/old_page_name/" For your information, the code that strips out "index.php/" is: RewriteCond %{THE_REQUEST} ^GET.index.php [NC]
Technical SEO | | nyc-seo
RewriteCond %{THE_REQUEST} !/uSZWTLna/.
RewriteRule (.?)index.php/(.*) /$1$2 [R=301,L] Then we have 301 redirects from "example.com/old_page_name/" to "example.com/new-page-name/" QUESTION 1: Is this two-step redirect approach okay, or would it be better to skip the separate index.php stripping code and simply have 301 redirects that include "index.php" in the urls? QUESTION 2: Will we lose some of the benefit of the links that have to pass through a 301 redirect? QUESTION 3: We have 50 or so redirects. Will this affect performance of the site? How many redirects does it take to start affecting performance? Thank you!0 -
What to do with 302 redirects being indexed
Hi there, Our site's forums include permalinks that for some reason uses an intermediary URL that 302 redirects to the URL with the permalink anchor. For example: http://en.tradimo.com/learn/chart-analysis/time-frames/ In the comments, there is a permalink to the following URL; en.tradimo.com/co/50c450005f2b949e3200001b/ (there is no content here, and never has been). This URL 302 redirects to the following final URL: http://en.tradimo.com/learn/chart-analysis/time-frames/?offset=0&limit=20#50c450005f2b949e3200001b The problem is, Google is indexing the redirect URL (en.tradimo.com/co/50c450005f2b949e3200001b/) and showing duplicate content even though we are using the nofollow tag on these links. Ideally, we would directly use the last link rather than redirecting. Alternatively, I'd say a 301 redirect would be preferable. But if both aren't available, is there a way to get these pages out of the index? Is the canonical tag the best way? I really wish I could just add /co/ to the robots.txt file, but I think they would still be in the index, right? Thanks for your help!
Technical SEO | | etruvian0 -
301 Redirect Domain or 301 Redirect Domain + Interior Pages
Hello - My company acquired another company in our industry and our IT team immediately set up the acquired companies domain name as a an alias to our site. This created a duplicate version of our website under another domain name and Google started ranking interior pages from the aliased acquired site for several top keywords that were previously held by our real site. Should we 301 redirect just the top level domain name of the acquired site to the real site or 301 redirect the top level domain name and the interior pages on the acquired site to help ensure that our real domain will take back the rankings it once had? Thanks!
Technical SEO | | Room2140 -
Redirect or not to redirect
We are rebuilding a website and try to get rid of errors. The content remains exactly the same but we correct the code and make it load faster. The site has quite many backlinks and I can't decide whether to remove .html endings from the urls and 301 redirect to the new ones or leave them with the older ending. If I remove the endings how much of the link juice will be passed? Anyone any idea?
Technical SEO | | sesertin0 -
Https redirect
Hi there, a client of mine is asking me if Google would penalize to redirect from all the http urls to https (they want to change the security protocol). I assume it is going to work as a classic 301, right? so they might lose some authority in they way, but I am not 100% sure. Can anyone confirm this? does anyone has a similar experience? thanks a lot!
Technical SEO | | elisainteractive0