Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
Can "window.location" javascript on homepage affect seo?
-
Hi!
I need to add a splashpage to my wordpress site. I use "window.location" javascript on the homepage to redirect on the splashpage (controlled by cookie to redirect only for the first access).
Can this technique affect the SEO on homepage?
Thanks in advance!
-
Hi There
I'm honestly not versatile in the intricacies of how window.location works - but I can tell you how to check if this is OK for search engines.
You can try a few things to see how Google "sees" the content;
- Do a fetch as Googlebot in Webmaster Tools
- Check the cache of the page if it has already been indexed (try text-only cache)
- Try running it through a header checker like URI Valet (set to Googlebot as user agent)
In all cases, you will get a "search engine view" of the page content. If it's what you want engines to see, then you are all set!
As far as the details of how to implement everything, I'd have to lean on a developer for that. But that's how you would check and verify it.
-
Ok, but in case i choose the PHP solution, i suppose that two different content (one for the splash and one for the default home) in the same homepage will make trouble: if the url are the same and the content is dynamically changing Search Engine Bots wont be able to crawl correctly
-
You really need a splash page, you know that it's really killing your bounce rate if you let users chose on the first entrance of your site? Besides that I wouldn't got for a JS solution to redirect users. Although Google is perfectly able to use JS these days I think a PHP solution is more effective.
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
-
Phone number for SEO
We have had an interesting question from a client. They have asked if removing their phone number from their website would have an affect on their rankings. Our immediate answer was 'No' but it may affect the Brand, Usability and Customer experience by restricting the methods of contact. This then made us think that perhaps then it could have an effect in the long term. This situation is also complicated by the fact that they do not have a Google Local Plus account for operational, sensitivity reasons (they don't want to openly publicise their address) We believe that there shouldn't be any negative affect but thought we would open a discussion. Thanks in advance for any comments/ideas.
On-Page Optimization | | vital_hike0 -
How much text is recommended for a homepage?
I'm working with a client who is redesigning their site and the new design is very image heavy. Does anyone have any recommendations on the minimum amount of text the homepage should have so that it will rank (or at least not be penalized)? It's a site created by a known brand, but the site itself and URL are relatively new. Katherine
On-Page Optimization | | KatherineWatierOng0 -
"translation" of code in htaccess file
Hi everyone! I am a newbie to the whole SEO and html thing and I am trying to get a better understanding of the "behind the scenes" part of my website. I hope I can find someone here who can translate a piece of code for me that I have in my htaccess file: Options -Multiviews
On-Page Optimization | | momof4
Options +FollowSymLinks
rewritecond $1 !^(index.php|public|tmp|robots.txt|template.html|favicon.ico|images|css|uploads)
rewritecond %{REQUEST_FILENAME} !-f
rewritecond %{REQUEST_FILENAME} !-d
rewriterule ^(.*)$ index.php?link=$1 [NC,L,QSA] I know that something is getting redirected to the index file, but what (or when) exactly? Does the word "robots"mean that search engine crawlers are getting redirected here? And is this good or bad (in terms of SEO)? Or is this redirecting people who try to get to my robots/ template or image files?? Thanks in advance for any answers!0 -
Can I add multi location business cities to homepage meta title or desc.?
I have a business with 6 locations (in the same state) but very different cities. We we expanded from one location with the city name in the URL we followed best practices to move to the new domain without the singular city name in the URL. We definitly took a hit on the organic side and I'm trying to figure out best practice for where to add geo info. Currently I have geo info: -In footer
On-Page Optimization | | beehiive
-Contact Page -On local page It's a WP site and each location has it's own page (ie. locations/geolocation_keyword). I know all other locations will take sometime but my concern is the hit we took on the original location that had geo-target URL. I guess really my question is simply can I include city names in homepage meta title and desc.?
and is there anything else I can do to bounce back organically on the original city faster?0 -
Duplicate Content when Using "visibility classes" in responsive design layouts? - a SEO-Problem?
I have text in the right column of my responsive layout which will show up below the the principal content on small devices. To do this I use visibility classes for DIVs. So I have a DIV with with a unique style text that is visible only on large screen sizes. I copied the same text into another div which shows only up only on small devices while the other div will be hidden in this moment. Technically I have the same text twice on my page. So this might be duplicate content detected as SPAM? I'm concerned because hidden text on page via expand-collapsable textblocks will be read by bots and in my case they will detect it twice?Does anybody have experiences on this issue?bestHolger
On-Page Optimization | | inlinear0 -
The word "in" between 2 keywords influence on SEO
Does anybody know when you have the word "in" between two keywords has this a negative influence in Google? For example: "Holiday Home Germany" is the search term in Google
On-Page Optimization | | Bram76
"Holiday Home in Germany" as h1 on our website or do we have to use "Holiday Home Germany" on our website?0 -
What is the most SEO friendly Shopping Cart?
What is the most SEO friendly shopping cart? I have been using zen-cart for 6 years. Seems Google doesn't like it as much as other carts. I started a new site about 6 months ago using Magento. When I build links to this site the terms move. The terms are very similar. So I would imagine the competition is the same. I am curious if anybody has tried with different carts and found anyone to be better than the others. Also the new site has about one tenth the amount of products but has a lot more pages indexed.
On-Page Optimization | | kicksetc0