SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member b3790302's Avatar
    Join Date
    Jun 2011
    0 Post(s)
    0 Thread(s)

    How do I set up Google Search for my site only


    I am trying to update my Google Search box code but even when I choose "my site only" and enter my url with the * it doesn't work. When I try it out in my website, I get results for the web and not my site. Is there any way to fix this like with the old code that you could just search your site??

    Thank you!!!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Melbourne, AU
    448 Post(s)
    8 Thread(s)
    Hi b3790302. Welcome to SitePoint.

    There is some standard code you can add to your site to create a Google search form. You just need to replace the domain with your own site's domain (see in red):

    <form method="get" action="">
        <label for="q">Search this Site</label> 
        <input type="text" class="text" name="q" id="q" size="31" maxlength="255" value=""> 
        <input class="submit" type="submit" value="Search">
        <input type="hidden" name="sitesearch" value="">
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts