SitePoint Sponsor

User Tag List

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

    How do I set up Google Search for my site only

    Hello,

    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
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    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):

    Code:
    <form method="get" action="http://www.google.com/search">
        <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="mydomain.com">
    </form>


Bookmarks

Posting Permissions

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