All topics

SEO interview questions

19 questions with answers. 349 open jobs in India ask for SEO.

  1. What are the best ways to improve a site's position in Google?

    Here are some rules I follow:

    Generally, if you follow these rules, your domain will naturally rank better with Google over time. If you try to speed this process up, using things like keyword spamming on your website, this is likely to be picked up and blacklisted by Google so avoid this wherever possible.

    From Webmasters Stack Exchange: asked by ilhan, answered by Nat Ryall (CC BY-SA 4.0)

  2. Does the order of keywords matter in a page title?

    Yes, putting important keywords closer to the beginning of a title does help SEO. SEOmoz's ranking factors survey agrees, as do other sources.

    Keyword Use Anywhere in the Title Tag
    66% very high importance

    Keyword Use as the First Word(s) of the Title Tag
    63% high importance

    Keyword Use in the Root Domain Name
    60% high importance

    Keyword Use Anywhere in the H1 Headline Tag
    49% moderate importance

    Side rant: Personally I hate this because it actually devalues user experience in many cases. For home pages, if you are a company selling red widgets a spammy title like "red widgets, widgets, blue widgets" can be more successful that "Awesome WidCo plc - suppliers of red widgets".

    I believe the site name should come first on the home page, but SEO forces you to do the opposite.

    From Webmasters Stack Exchange: asked by Rebecca Chernoff, answered by DisgruntledGoat (CC BY-SA 4.0)

  3. How should I structure my URLs for both SEO and localization?

    There are many acceptable ways to structure your site for both SEO and internationalization. Each have advantages and disadvantages.

    Top Level Domains

    Buy the same domain name at multiple top level country domains like example.com, example.es and example.de.

    Advantages

    • Fully supported by Google. You can add the sites to Google Webmaster Tools where there are options to tell Google about how they are targeted.
    • Often preferred by users who tend to like content published on the TLD for their country
    • The domain name itself can be localized. Many international users may react badly to English words or an English sounding domain name. This can be especially important for languages that do not use a Latin alphabet.
    • Supports localization by country. You can have separate sites like example.co.uk and example.com.au targeted at audiences in different countries. The sites may have duplicate content with slight spelling differences and still rank well. In fact, multiple well localized sites in the same language may rank better than a single site in that language.
    • Hosting can be localized by pointing DNS to a web server in the country being targeted.

    Disadvantages

    • Expensive and time consuming to buy many domains. Especially if you have to deal with squatters.
    • Cookies cannot be shared across multiple locales, meaning that users have to log in separately to each site.
    • No good option for localizing only by language since many languages have multiple countries and no country TLD may be the language code. Even in cases where the TLD does match the language code like es, search engines may assume that the site is only appropriate for users from Spain, not for all Spanish speakers.

    Sub-domains

    Buy a single domain, and use sub-domains such as en.example.com, and es.example.com

    Advantages

    • Fully supported by Google.
    • Supports localization by country or by language.
    • Hosting can be localized by pointing DNS to a web server located close to users.
    • Easy and cheap to implement compared to buying multiple domains.
    • Cookies can be shared across all locales, enabling single sign on for a more seamless user experience.

    Disadvantages

    • No opportunity to localize the domain name itself
    • May look less local to users compared to a top level domain.

    Sub-directories

    Buy a single domain, and use sub-directories such as example.com/en/, and example.com/es/

    Advantages and Disadvantages

    • The same as sub-domains, except that there is one DNS entry which precludes hosting your site in multiple countries for different locales.

    Techniques that are NOT recommended

    Read the rest at the sourceFrom Webmasters Stack Exchange: asked by artlung, answered by Stephen Ostermiller (CC BY-SA 3.0)

  4. Moving from HTTP to HTTPS in Google Search Console

    Update (February 27, 2019):

    Google have announced domain-wide data in Search Console, which combines all subdomains and protocols of a domain, http, https, www, and non-www.

    Old answer:

    Google Webmaster Tools treats HTTP and HTTPS as separate sites and you cannot inform Google using Google Search Console, that you moved from HTTP to HTTPS since the address move tool does not support protocol changes

    You can though add the HTTPS site versions. When adding a site, simply type the URL including the https:// prefix. You will then have two sites in Google Webmaster Tools.

    This fits with the general principle that http://www.example.com is considered a different URL from https://www.example.com and may validly serve different content, Google is OK with that. In practise, most websites set up a redirect, but Google Webmaster Tools is designed to work in either case, just add both sites.

    Similarly, you should add the www and non-www versions of your site, so in the end, you should have four sites:

    • http://www.example.com
    • https://www.example.com
    • http://example.com
    • https://example.com

    Until 2019, you could set whether www or non-www is preferred, but I'm not aware of a similar setting for HTTP vs HTTPS.

    From Webmasters Stack Exchange: asked by user2240778, answered by Flimm (CC BY-SA 4.0)

  5. URLs: Should I use hyphens, underscores or plus symbols?

    Although there seems to be less difference now than there was in the past, hyphens are recommended if you want each of the terms in your URL recognized as an individual word.

    The reason for this is that search engines find it easier to treat hyphens as word separators, just as they are in the English language. Underscores, however, are not normally used in English as word separators. In many cases it is desirable to see them as part of the characters before and after them, for instance when underscores are used in function names for programming, and other similar situations.

    There are a couple cases where this might matter. For one, if someone uses the full URL as the anchor text for a link, then the search engines will be able to pull out those terms as relevant words. For another, it is possible that search engines use words in the URL as correlative factors to determine the relevance of those terms to the page content.

    Matt Cutts has a dated piece that explains this, and there is a more recent Google Webmaster Help video from August 2011 saying that Google still does not treat underscores as word separators. You may as well make life as easy as possible for the search engines, for the same reason that you give them valid HTML.

    If you are starting a new site, you are definitely better off using dashes.

    From Webmasters Stack Exchange: asked by delete, answered by JasonBirch (CC BY-SA 3.0)

  6. How do I transition to SSL without affecting PageRank?

    Your proposed solution is the best way forward from an SEO perspective. You avoid duplicate content by using the canonical URL and the 301 redirect will transfer most of your PageRank (a small amount is lost in the redirect). Plus thanks to the strength of Stack Overflow's pages in Google I would be more then stunned if you saw any fluctuations in your rankings. Smaller sites would see a transition period in their rankings while Google got caught up with their new URLs but I don't forsee that happening to Stack Overflow.

    FYI, John Meuller, the Google employee you quoted, is an active member here. With a little luck he'll give us his perspective on this.

    From Webmasters Stack Exchange: asked by Nick Craver, answered by John Conde (CC BY-SA 3.0)

  7. How bad is it to use display: none in CSS?

    In these days of jQuery (and other JavaScript frameworks) heavy websites then I can't see how it can be a problem, since it's used extensively when you use things like jQuery sliders, transitions, galleries, tickers etc. These are now commonplace and search-engines are clever enough not to blindly penalise their use.

    A user RainboRick states this in the Google Webmaster Central forum:

    Merely using display:none will not automatically trigger a penalty. The key is whether or not there is a mechanism - either automatic or one that is invoked by the user - to make the content visible. Google is becoming very adept at processing JavaScript to find and interpret such mechanisms. If you use valid HTML, CSS, and JavaScript you have nothing to worry about.

    From Webmasters Stack Exchange: asked by Andy, answered by Dan Diplo (CC BY-SA 4.0)

  8. Anchor tag inside <h1> or <h1> inside anchor tag: which is better?

    If you are using HTML5, just pick one; they're equivalent.
    HTML5 does allow block-level links, but in your case there's no particular reason to do it, since there's only one block-level element. Personally, I wouldn't do it here, because having the <h1> tag on the outside would make it easier to scan for in source code.

    Anything else (XHTML, HTML4, etc) and the second one is just plain wrong. It wouldn't be valid code, and on some level that's bad for your search optimization [Insert standard disclaimer about how much any single offense really affects anything, etc.].

    From Webmasters Stack Exchange: asked by Sangram, answered by Su' (CC BY-SA 3.0)

  9. SEO: Where do I start?

    Here is what you need to know for SEO.

    1) Perhaps the most important thing is the canonical link tag. The canonical link tag represents an absolute path that you would like to represent your page in a search engines index to reduce redundant indexing. This is supported by MSN, Yahoo, and Google. http://www.mattcutts.com/blog/canonical-link-tag/

    2) Content is king. If your content sucks then it does not matter what you do. Fix spelling and grammar errors. Write naturally and clear. Do not try to stuff your content with search terms. If your content is valid and well written it will be respectfully indexed.

    3) Validate your markup. Just because Google's markup is trash is not an excuse for your markup to be trash. Search bots have to weed through your tags, attributes, and content. If the search bot has to struggle to make sense of your page, no matter how glorious your content is, it will screw you when it indexes your page.

    4) Focus on accessibility more than SEO when writing markup. If a blind user can read and navigate your content with ease of understanding then so will the search bot and your page will achieve superior SEO as a result.

    5) Be liberal in what you have to say, but be conservative in how you say it. Use markup that is appropriate to first structure your content and secondly describe it. Be verbose with your code and you will be well loved.

    6) SEO bots do not care how pretty, usable, or interactive your page is. Put all CSS and styles in an external stylesheet. The ONLY exception to this rule is that occasionally a display:none or visibility:hidden style should go inline on elements you wish to hide from text readers. JavaScript should always exist in an external file. There is absolutely no exception to the JavaScript rule.

    7) Don't encode the Bible, Quran, and Book of Mormon on a single page of HTML. Search bots have a limit, typically about 200k, and once that limit is surpassed they will abandon your page.

    That is all you need to know to absolutely conquer SEO. Once you have mastered SEO the next subject will be SEM, which is a bedtime story for another time.

    From Webmasters Stack Exchange: asked by James, answered by austin cheney (CC BY-SA 2.5)

  10. What are the most important things I need to do to encourage Google Sitelinks?

    You will need to have quite a bit of traffic to your site to get those. Keep creating great content. Google will not give those out easy.

    Be sure that you have your navigation marked up with semantic HTML and include an id of nav or navigation on your menu. This will help Google know what links are your navigation. (as opposed to a list of links).

    Also, once you get them Google will give you an option to control what links you want in your sitelinks via Google Webmaster Tools.

    There is no easy way or publicly know algorithm that will give you sitelinks. And I'm sure that algorithm changes all the time.

    DO NOTS:

    • Don't use JavaScript For links and menus.
    • Don't think about it too much and give it time, sitelinks are rare.

    From Webmasters Stack Exchange: asked by cgp, answered by Kevin (CC BY-SA 2.5)

  11. Will having multiple domains improve my seo?

    This won't do what you hope it will do. The redirect will effectively tell Google that URL no longer exists and has moved to your new URL. Plus since the new domain also won't have any links pointing to it it won't transfer any link love over either. The only positive it will have is you can use it as a shorter and more recognizable domain name which is good for users.

    And just having the keywords in the domain does not automatically rank you #1 (or even well at all) just because it matches the search term. The domain name is just one of many factors affecting how a page is ranked. It's very, very common to see pages with the exact domain of a search term not rank #1 simply because other pages have much better content.

    Better content = better rankings. Make that your mantra if you want to do well in the search engines.

    (BTW, if this really worked everyone would buy the domains of the keywords they want to rank well for. They don't do it because it doesn't work. If it did then the first person to buy all the domains wins. Plus it is too easy to manipulate this way. The easier it is to manipulate the less it is used in the ranking algorithm if it is even used at all).

    From Webmasters Stack Exchange: asked by Anonymous12345, answered by John Conde (CC BY-SA 3.0)

  12. How do I rename a domain and preserve SEO?

    Check out Google's guide to moving a site:

    • Use a 301 Redirect to permanently redirect all pages on your old site to your new site.
    • Check both external and internal links to pages on your site and make sure they are updated to point to the new domain (obviously, for external links this is difficult)
    • Use the Change of Address tool in Webmaster Tools to notify Google of your site's move.
    • We recommend that you create and submit a Sitemap listing the URLs on your new site.

    After the move, sanity checks to make sure things are working:

    • Check the web crawl errors for both your old and new sites, to make sure that the 301 redirects from the old site are working properly, and that the new site isn't showing unwanted 404 errors.
    • If you've submitted a Sitemap, the Sitemap Details page lets you see how many URLs in your Sitemap we've crawled and indexed.

    Esp. the Change of Address tool might be of interest.

    From Webmasters Stack Exchange: asked by Geoff Dalgas, answered by jmb (CC BY-SA 2.5)

  13. Say a customer is an observant Jew and wants his site to be offline on Shabat - SEO problem?

    Check out how B&H Photo/Video handles this. They allow the site to remain active but inactivate the cart functions.

    This handles the no work/commerce on the sabbath.

    There will be an SEO issue if you deny access to the content.

    From Webmasters Stack Exchange: asked by user58733, answered by Fiasco Labs (CC BY-SA 3.0)

  14. Does it make a difference if your URL path ends in a trailing slash or not?

    Read the full blog post by Google here, http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html, it covers this exact topic.

    Long story short Google does not care if you have a trailing slash. However, it will treat the below 2 paths as separate pages.

    http://www.example.com/some/slug/paths/
    http://www.example.com/some/slug/paths
    

    If you need to have both of the above and they are the same content your best option is to do a 301 Redirect to one of them from the other.

    If that isn't an option you will want to add a <link rel="canonical" href="your link"/> to both pages which will define which one is the master or parent. Matt Cutts has a great article here, http://www.mattcutts.com/blog/canonical-link-tag/, that covers the topic in its entirety.

    From Webmasters Stack Exchange: asked by mar10, answered by Ben Hoffman (CC BY-SA 3.0)

  15. What is the benefit of forcing a site to load over SSL (HTTPS)?

    HTTPS does not just provide secrecy (of which you are doubting the value, though there are good reasons for it still) but also authenticity, which is always of value. Without it, a malicious access point/router/ISP/etc. can rewrite any part of your site before displaying it to the user. This could include:

    • injecting ads for your competitors
    • injecting ads or annoying widgets that make your site look bad and harm your reputation
    • injecting exploits to perform drive-by downloads of malware onto the visitor's computer, who then (rightly!) blames you for it happening
    • replacing software downloads from your site with ones that have bundled malware
    • lowering the quality of your images
    • removing parts of your site they don't want you to see, e.g. things that compete with their own services or depict them in a bad light
    • etc.

    Failure to protect your users from these things is irresponsible.

    From Webmasters Stack Exchange: asked by Eric, answered by R.. GitHub STOP HELPING ICE (CC BY-SA 3.0)

  16. Do meta keywords have any impact on ranking algorithms?

    The fact is, neither Google nor Bing (nor Yahoo, since they use Bing under the hood) use meta keywords at all. Some other search engines at least index them, so they do count somewhat, but their weighting in ranking algorithms is very low.

    Adding meta keywords can only be useful when they are targeted to pages individually. In other words, a page about "red mechanical widgets" should have those three keywords on it, and similarly for "blue electronic widgets". Putting "red, blue, mechanical, electronic, widgets" as your keywords across the site means they lose their effectiveness.

    To put this into perspective:

    1. Keywords are only useful when they are targeted and you spend more time on them.
    2. Keywords have zero or negligible impact on search rankings.

    I think it's clear to see that it's not worth spending the time on them.

    From Webmasters Stack Exchange: asked by jessegavin, answered by DisgruntledGoat (CC BY-SA 4.0)

  17. Are page ranks for subdomains independent?

    John Conde's answer, which is currently the accepted answer, is wrong because of an overly pedantic emphasis on PageRank, which is both a) a formula which is detailed in a publicly accessible research paper and b) Internet shorthand for "the sum of all algorithms Google uses to rank pages", which is a far wider topic than PageRank proper.

    In the sense intended by a question, there is absolutely a difference in Google's treatment of two pages based on whether they are on the same domain or on two subdomains of that domain.

    One factor is what SEOs call "domain authority" or "domain trust." A link to any page on a domain says that the linked page is authoritative for the linked topic (the one mentioned in anchor text), and the linked page is authoritative for other topics, and that the linked domain is authoritative for other topics. This is beyond question: it is why Wikipedia ranks for more queries than God, despite not having huge numbers of in-links to newly created articles. It is why a popular blogger is more likely to rank for a newly created article (with no links) than an unknown blogger, even if their title and other on-page factors are identical.

    In general, Google is thought to treat subdomains as having a lesser relationship than pages within a domain: they do not fully share domain authority amongst each other. This solves problems like the technique, prevalent a few years ago, where folks would use a profusion of automatically generated subdomains (chicago.example.com, boston.example.com, 67k examples elided, etc) to achieve higher rankings.

    This is one of the major reasons why SEOs advise clients to put blogs on example.com/blog rather than blog.example.com .

    There are also issues, particularly with major hosting companies, where particular subdomains are blessed (www.wordpress.com) and should rank extraordinarily highly, but randomblog.wordpress.com should receive almost no credit from the association with Wordpress. One could imagine StackExchange eventually receiving similar treatment, although whether that would be determined algorithmically or by a hand-issued exception in the Googleplex is anyone's guess.

    As a site owner, the takeaway message for you is simple: do not use more subdomains than you can get away with. It will cost you, by splitting your link equity and decreasing all of your pages' potential to rank.

    From Webmasters Stack Exchange: asked by Brian R. Bondy, answered by Patrick McKenzie (CC BY-SA 4.0)

  18. How can I prevent Google mistakenly offering to translate a page to English when it already is in English?

    Google does not use language meta-data since we've found that it's generally incorrect. Using HTTP headers, HTML meta tags or element-level lang-attributes does not have an impact on Google's language recognition, so unless you want to do that for other purposes (eg screen-readers), you can probably skip on that.

    One thing to keep in mind is that Google has no problem recognizing multiple languages per page. So even if we should recognize that a part of the page is say in Italian (perhaps when you write about Italian hotels), and we show a "translate this page" link in the search results, we'll probably still be able to recognize that it's mostly in English. A simple way to check that is to use the advanced search options to select a specific language and do a site:-query for your site.

    From Webmasters Stack Exchange: asked by DisgruntledGoat, answered by John Mueller (CC BY-SA 2.5)

  19. Why should we use tags like p, span, hx tags when we can use CSS instead?

    The short version is that that the various tags and CSS have different purposes.

    <h1>Whatever</h1>, for example, carries a certain amount of meaning along with its use: "This is a header, an important–first-level one" and so on. Some parsers also use the hx tags(and others) to create an outline of the document's structure which can be used for anything from data processing to accessibility(eg. screenreaders jumping to the next question on the webmasters homepage by skipping to the next h3).

    You can't dismiss the semantic tags based on what you can do with CSS, and vice versa.
    You can apply CSS to another tag to make it look the same as the h1, eg: <span style="font-weight:bold;font-size:2em">Whatever</span> but that still doesn't make that span tag an actual header in terms of function and semantics. In this case, that outline I linked to above would be pretty much impossible because those spans aren't headers, but just some text that you arbitrarily made big and bold.

    From Webmasters Stack Exchange: asked by sangee, answered by Su' (CC BY-SA 3.0)

Related topics

Where these questions come from

Open-source collections on GitHub, official documentation, a government careers service and the Stack Exchange sites, each used under its own licence. The answers are the authors' own words: we only tidy the layout, leave out pictures, and cut a long answer with a link to the rest. Stack Exchange answers stay under CC BY-SA and name who asked and who answered.