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
-
What to do with "trendy" content that is no longer relevant?
Hi all, My company is in the fashion/jewelry industry and we regularly create short content describing the latest trends in jewelry. We do not include any sort of date reference on the content, which means that a searcher who gets to our site has no way of knowing if this is a trend from 2008 or 2016. Does anyone have any experience with the best way to handle this? I want to remain relevant for our customers. It seems like a big disservice to our customers to show them a "trend" which trended 5 years ago. Is there a benefit to keeping this content around or would it be better to cycle it off the site after 6 months or so? Thanks for any advice or experience you have! R.
On-Page Optimization | | FireMountainGems1 -
Will ReDesigning my website negatively affect SEO?
I currently have a one page website which lists all the company information on one page [domain name is www. bwd . co . za]. It uses javascript for navigation. My challenge is that the layout is outdated and I would like to update it with a high quality WordPress theme which will not be a one-pager. Currently on Open Site Explorer the website has a domain authority of 30/100 and page authority of 41/100. I've worked hard to push the numbers to get to where they are hence I'm a bit concerned. Will re-designing my website negatively affect SEO?
On-Page Optimization | | bonganig0 -
Need I add rel="dofollow" or not?
Hello, My website is http://www.vietnamvisacorp.com is using the href links without meta tag rel="dofollow" such as I am using . Should I put ref="dofollow" in this: Thank you!
On-Page Optimization | | JohnHuynh0 -
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 -
URL for location pages
Hello all We would like to create clean, easy URLs for our large list of Location pages. If there are a few URLs for each of the pages, am I right when I'm saying we would like this to be the canonical? Right now we would like the URL to be: For example
On-Page Optimization | | Ferguson
Domain.com/locations/Columbus I have found some instances where there might be 2,3 or more locations in the same city,zip. My conclusion for these would be: adding their Branch id's on to the URL
Domain.com/locations/Columbus/0304 Is this an okay approach? We are unsure if the URL should have city,State,zip for SEO purposes?
The pages will have all of this info in it's content
BUT what would be best for SEO and ranking for a given location? Thank you for any info!0 -
German SEO
Just a quickie, Does anybody know of any strong German SEO agencies? Many Thanks Sean
On-Page Optimization | | Yozzer0 -
Best SEO structure for blog
What is the best SEO page/link structure for a blog with, say 100 posts that grows at a rate of 4 per month? Each post is 500+ words with charts/graphics; they're not simple one paragraph postings. Rather than use a CMS I have a hand crafted HTML/CSS blog (for tighter integration with the parent site, some dynamic data effects, and in general to have total control). I have a sidebar with headlines from all prior posts, and my blog home page is a 1 line summary of each article. I feel that after 100 articles the sidebar and home page have too many links on them. What is the optimal way to split them up? They are all covering the same niche topic that my site is about. I thought of making the side bar and home page only have the most recent 25 postings, and then create an archive directory for older posts. But categorizing by time doesn't really help someone looking for a specific topic. I could tag each entry with 2-3 keywords and then make the sidebar a sorted list of tags. Clicking on a tag would then show an intermediate index of all articles that have that tag, and then you could click on an article title to read the whole article. Or is there some other strategy that is optimal for SEO and the indexing robots? Is it bad to have a blog that is too heirarchical (where articles are 3 levels down from the root domain) or too flat (if there are 100s of entries)? Thanks for any thoughts or pointers.
On-Page Optimization | | scanlin0