URL's with variables with spaces

Discussion in 'Google AdWords' started by Jon12345, Feb 12, 2007.

  1. #1
    I have mysite.com/index.php?kw=cheap widgets. But this comes up with an error in adwords, saying malformed url.

    What am I supposed to do?

    Thanks,

    Jon
     
    Jon12345, Feb 12, 2007 IP
  2. ghoti

    ghoti Peon

    Messages:
    139
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Substitute %20 for the space. So it would become mysite.com/index.php?kw=cheap%20widgets
     
    ghoti, Feb 12, 2007 IP
  3. Jon12345

    Jon12345 Peon

    Messages:
    599
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What about using a "+"? Is that the same as using a %20?
     
    Jon12345, Feb 12, 2007 IP
  4. GuyFromChicago

    GuyFromChicago Permanent Peon

    Messages:
    6,728
    Likes Received:
    529
    Best Answers:
    0
    Trophy Points:
    0
    #4

    If that URL work on your site it's good for AdWords too.
     
    GuyFromChicago, Feb 12, 2007 IP
  5. ghoti

    ghoti Peon

    Messages:
    139
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yeah, within the query parameters the + is usually treated the same as a %20 (which is the hex code for a space). You can use the %20 anywhere in a URL, but the + substitutes for a space only in the query parameters.

    i.e., mysite.com/index.php?kw=a+b is the same as mysite.com/index.php?kw=a%20b, but mysite.com/in+dex.php is not a proper substitute for mysite.com/in dex.php ... only mysite.com/in%20dex.php would work in that case.

    + is the more common substitution in the query params.
     
    ghoti, Feb 12, 2007 IP
  6. Jon12345

    Jon12345 Peon

    Messages:
    599
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Gonna use %20 thanks.
     
    Jon12345, Feb 12, 2007 IP