Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. Home
    2. SEO Tactics
    3. On-Page Optimization
    4. Can "window.location" javascript on homepage affect seo?

    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?

    On-Page Optimization
    3
    4
    2609
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • StudioCiteroni
      StudioCiteroni last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • evolvingSEO
        evolvingSEO last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • StudioCiteroni
          StudioCiteroni @Martijn_Scheijbeler last edited by

          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

          1 Reply Last reply Reply Quote 0
          • Martijn_Scheijbeler
            Martijn_Scheijbeler last edited by

            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.

            StudioCiteroni 1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post

            Got a burning SEO question?

            Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


            Start my free trial


            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.

            • See all categories

            Related Questions

            • rigelcable

              Hreflang Errors 404 vs "Page Not Found"

              For a websites that differ between catalogs (PDPs) what hreflang error causes the least harm? Obviously the best solution is to only have hreflang for shared products, but this takes more work to implement. So when no identical product exists... 1. Hreflang points to 404 or 410 error. 2. Hreflang points to 200 status "Page Not Found" page. This obviously has the additional issue of needing to point back to 100+ urls. I want to avoid having Google decide to ignore all hreflang due to errors as many correct urls will exist. Any thoughts?

              On-Page Optimization | | rigelcable
              0
            • MirzaeeMustafa

              How Do SSL Certificates Affect On SEO?

              Does really a SSL certificate affect on SEO? How? Why? According to my hosting provider (ganje.host), "https" improves SEO! As I know, It decreases speed. So how does it improve SEO when my speed is slower than before?

              On-Page Optimization | | MirzaeeMustafa
              0
            • danielecelsa

              Homepage SEO optimization

              Hello, I’m almost ready to lunch my new website https://thetravelhoop.com , I just need to create the content of the product page and put all the images. I would like to know what you think in terms of SEO of the home page (is the content that I want to rank the most). My doubt is that since it is a landing page, there is not a lot of text but mostly <h>. It’s not a styling decision of course (I know is bad practice) but mostly because they are supposed to be title/headings.</h> Do you think I’m doing something wrong, or do you have any suggestions? Thank you, Daniele

              On-Page Optimization | | danielecelsa
              0
            • tprg

              Does CTR Affect Ranking & Authority? Can PPC Influence That Too?

              Hi everyone, Good CTR and bounce rate seem to affect rankings positively, but what about domain authority? Is that something built entirely on links and semantics, or does CTR play a factor too? Consider a homepage ranking for its brand name. Switching off any brand PPC will increase the natural listing's CTR. Would that have a positive SEO impact on the homepage/domain?

              On-Page Optimization | | tprg
              0
            • marketing_zoovy.com

              Using Escaped Fragments with SEO

              Our e-commerce platform is in the process of changing to what we call app based stores (essentially running in a browser as single page web-app)  With these new stores they are being built in HTML 5 and using escaped fragments.
              Currently merchants are usually running 2 stores until we launch to app site at 100%.  My questions are really concerning the app stores which right now show on a subdomain but will essentially take over the primary domain.   Here is an example:
              app.tikimater.com and app.sportsworld.com Since I am not a developer, I'm really having a hard time understanding the escaped fragments. I'm using this but https://developers.google.com/webmasters/ajax-crawling/docs/getting-started I'm not sure what my actual urls should look like and what the canonical should be set to. Right now they have been removed but previously they had  http:app.tikimaster.com#!v=1  Also, and how I should be setting up my meta information for Google so 1) pages are indexed timely 2) pages are indexed with the correct information.  I am still setting the meta titles and descriptions but in some instances Google uses other info. With the new platform we are moving away from on page content (written paragraphs) but category pages would have related products embedded.  Should I still be pushing to have some type of intro text, since it would solely be for SEO and not the shoppers experience. All product pages have content (product description etc) Thank you for any advice

              On-Page Optimization | | marketing_zoovy.com
              0
            • SarahCollins

              SEO Location Pages - ALT Image Tag Question

              Hello Guru's, I have a Hire Website whereby you can rent products online. I have created different Location pages for these which are in essence the same pages  page but with different location specific urls, title tags  , on page content etc etc. This helps me to rank for local search. These location pages also display 20 products per page. My question is  Should I make the ALT IMAGE TEXT location specific for each of the 20 products  . Example -  Steam Cleaner Rental in "location" or should I only amend a few of the Atl Image Texts to be location specific. I don't want to come accross as spammy in google eyes but I also don't want to be seen as having duplicate content , images etc etc What do you think ? thanks Sarah.

              On-Page Optimization | | SarahCollins
              0
            • Ferguson

              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
              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!

              On-Page Optimization | | Ferguson
              0
            • smaavie

              Avoiding "Duplicate Page Title" and "Duplicate Page Content" - Best Practices?

              We have a website with a searchable database of recipes. You can search the database using an online form with dropdown options for: Course (starter, main, salad, etc)
              Cooking Method (fry, bake, boil, steam, etc)
              Preparation Time (Under 30 min, 30min to 1 hour, Over 1 hour) Here are some examples of how URLs may look when searching for a recipe: find-a-recipe.php?course=starter
              find-a-recipe.php?course=main&preperation-time=30min+to+1+hour
              find-a-recipe.php?cooking-method=fry&preperation-time=over+1+hour There is also pagination of search results, so the URL could also have the variable "start", e.g. find-a-recipe.php?course=salad&start=30 There can be any combination of these variables, meaning there are hundreds of possible search results URL variations. This all works well on the site, however it gives multiple "Duplicate Page Title" and "Duplicate Page Content" errors when crawled by SEOmoz. I've seached online and found several possible solutions for this, such as: Setting canonical tag Adding these URL variables to Google Webmasters to tell Google to ignore them Change the Title tag in the head dynamically based on what URL variables are present However I am not sure which of these would be best. As far as I can tell the canonical tag should be used when you have the same page available at two seperate URLs, but this isn't the case here as the search results are always different. Adding these URL variables to Google webmasters won't fix the problem in other search engines, and will presumably continue to get these errors in our SEOmoz crawl reports. Changing the title tag each time can lead to very long title tags, and it doesn't address the problem of duplicate page content. I had hoped there would be a standard solution for problems like this, as I imagine others will have come across this before, but I cannot find the ideal solution. Any help would be much appreciated. Kind Regards

              On-Page Optimization | | smaavie
              5

            Get started with Moz Pro!

            Unlock the power of advanced SEO tools and data-driven insights.

            Start my free trial
            Products
            • Moz Pro
            • Moz Local
            • Moz API
            • Moz Data
            • STAT
            • Product Updates
            Moz Solutions
            • SMB Solutions
            • Agency Solutions
            • Enterprise Solutions
            Free SEO Tools
            • Domain Authority Checker
            • Link Explorer
            • Keyword Explorer
            • Competitive Research
            • Brand Authority Checker
            • MozBar Extension
            • MozCast
            Resources
            • Blog
            • SEO Learning Center
            • Help Hub
            • Beginner's Guide to SEO
            • How-to Guides
            • Moz Academy
            • API Docs
            About Moz
            • About
            • Team
            • Careers
            • Contact
            Why Moz
            • Case Studies
            • Testimonials
            Get Involved
            • Become an Affiliate
            • MozCon
            • Webinars
            • Practical Marketer Series
            • MozPod
            Connect with us

            Contact the Help team

            Join our newsletter
            Moz logo
            © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
            • Accessibility
            • Terms of Use
            • Privacy

            Looks like your connection to Moz was lost, please wait while we try to reconnect.