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
-
"Google-selected canonical different to user-declared" - issues
Hi Moz! We are having issues on a number of our international sites where Google is choosing our page 2 of a category as the canonical over page 1. Example; https://www.yoursclothing.de/kleider-grosse-groessen (Image attached). We currently use infinite loading, however when javascript is disabled we have a text link to page 2 which is done via a query string of '?filter=true&view=X&categoryid=X&page=2' Page 2 is blocked via robots.txt and has a canonical pointing at page 1. Due to Google selecting page 2 as the canonical, the page is no longer ranking. For the main keyphrase a subcategory page is ranking poorly. LqDO0qr
On-Page Optimization | | RemarkableAgency1 -
Question about Homepage Title
Hi there, I recently made a change to the title URL for my site, and it changed how Google displayed my sitemap. Before it showed the most common sites, and now it simply links to 4 of them below the domain URL without descriptions. I have attached images below which shows my problem. I hope this is the right section for this question. Thanks! 5ypdnY2 4u2HAia
On-Page Optimization | | One20 -
Website was given to someone else, does a "move" or something need to be performed in Webmaster Tools?
A website was given to another person for their business. None of the original webpages remain they have all been removed. There is nothing on that domain now. Is there some notification that needs to be made in webmaster tools to make Google aware of this?
On-Page Optimization | | will21120 -
"Turning off" content to a site
One site I manage has a lot of low quality content. We are in the process of improving the overall site content but we have "turned off" a large portion of our content by setting 2/3 of the posts to draft. Has anyone done this before or had experience with doing something similar? This quote from Bruce Clay comes to mind: “Where a lot of people don’t understand content factoring to this is having 100 great pages and 100 terrible pages—they average, when the quality being viewed is your website,” he explained. “So, it isn’t enough to have 100 great pages if you still have 100 terrible ones, and if you add another 100 great pages, you still have the 100 terrible ones dragging down your average. In some cases we have found that it’s much better, to improve your ranking, to actually remove or rewrite the terrible ones than add more good ones.” What are your thoughts? Thanks
On-Page Optimization | | ThridHour0 -
SEO for Online Auto Parts Store
I'm currently doing an audit for an online auto parts store and am having a hard time wrapping my head around their duplicate content issue. The current set up is this: The catalogue starts with the user selecting their year of vehicle They then choose their brand (so each of the year pages have listed every single brand of car, creating duplicate content) They then choose their model of car and then the engine And then this takes them to a page listing every type/category of product they sell (so each and every model type/engine size has the exact same content!) This is amounting to literally thousands of pages being seen as duplicates It's a giant mess. Is using rel=canonical the best thing to do? I'm having a hard time seeing a logical way of structuring the site to avoid this issue. Anyone have any ideas?
On-Page Optimization | | ATMOSMarketing560 -
Re="tag" Question
Hello, I own the site I putted rel="tag" in categories and product links , its correct? There are a lot of categories and products , I wont get penalized right? Just making sure to know if Im doing it right , thank you for help me 🙂
On-Page Optimization | | matiw0 -
How much does punctuation affect on-page SEO?
I have a page on a site that is targeted for "men's custom suits." Using the on-page analysis tool from SEOmoz it gives me an F for "mens custom suits" but an A with the apostrophe. Even though the apostrophe is proper English grammar, does it affect rankings either way?
On-Page Optimization | | cgray010 -
What image attribute should carry "anchor text" for internal linking
Newbie question: an internal link generally should carry keyword anchor text, so if the link is actually an image, what image attribute should contain the equivalent of the anchor text
On-Page Optimization | | k3nn3dy30