1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Links with & or ?

Discussion in 'Google Sitemaps' started by qwikad.com, Jun 25, 2017.

  1. #1
    I get an error when I try to add links containing & or ?. Is there a way to add those links anyway with a sitemap?

    As an example:

    http:/ /somesite.com/index.php?search=&category
    SEMrush
     
    qwikad.com, Jun 25, 2017 IP
    SEMrush
  2. John Martinez 2

    John Martinez 2 Greenhorn

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    Digital Goods:
    1
    #2
    You have to properly escape them - https://www.w3schools.com/html/html_entities.asp - i.e. you should use & instead of & in your URLs.

    You have to do the same think when you use them in HTML - so I recommend validating your website too - https://validator.w3.org/.
     
    John Martinez 2, Aug 14, 2017 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,622
    Likes Received:
    717
    Best Answers:
    151
    Trophy Points:
    420
    #3
    No, you don't. A sitemap is XML, which demands that you encode them. But HTML does NOT demand that. There is no harm in doing it, of course, but there is no demand for it.
     
    PoPSiCLe, Aug 15, 2017 IP
  4. websitetools

    websitetools Well-Known Member

    Messages:
    1,508
    Likes Received:
    25
    Best Answers:
    4
    Trophy Points:
    170
    #4
    Your sitemap generator will most likely handle such URLs automatically, so Google will accept them. For more information see this about entity escaping
     
    websitetools, Oct 10, 2017 IP