1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

[ask] Cara membuat sitemap sendiri untuk cms

Discussion in 'Pemrograman Web' started by reccountme, Feb 6, 2015.

  1. reccountme

    reccountme Ads.id Pro

    Joined:
    Jun 12, 2013
    Messages:
    364
    Likes Received:
    24
    Mau tanya,

    bagaimana cara membuat sitemap sendiri menggunakan PHP ya ? saya sedang build toko online dengan membuat cms sendiri. masih bingung cara membuat sitemapnya untuk di daftarkan pada google webmaster.

    terimakasih :-B
     
  2. detox

    detox Ads.id Fan

    Joined:
    Oct 20, 2010
    Messages:
    190
    Likes Received:
    2
    pake software namanya sitemap writer pro. coba cek d google mas
     
  3. kunbi

    kunbi Ads.id Pro

    Joined:
    Oct 10, 2009
    Messages:
    385
    Likes Received:
    40
    membuat sitemap untuk di masukkan di google webmasters tools itu sederhana mas. sudah di jelaskan formatnya di website google sendiri.
    _https://support.google.com/webmasters/answer/183668?hl=en

    PHP:
    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 
      <url>
        <loc>http://www.example.com/foo.html</loc> 
      </url>
    </urlset>
    dari penjelasan di website tersebut yang perlu anda masukkan paling tidak url lengkap dari produk anda. Tapi kalau mau lebih lengkap bisa ditambahi gambar dari item item yang ada.

    PHP:
    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" 
      xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" 
      xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
      <url> 

        <loc>http://www.example.com/foo.html</loc> 
        <image:image>
           <image:loc>http://example.com/image.jpg</image:loc> 
        </image:image>

        <video:video>     
          <video:content_loc>
            http://www.example.com/video123.flv
          </video:content_loc>
          <video:player_loc allow_embed="yes" autoplay="ap=1">
            http://www.example.com/videoplayer.swf?video=123
          </video:player_loc>
          <video:thumbnail_loc>
            http://www.example.com/thumbs/123.jpg
          </video:thumbnail_loc>
          <video:title>Grilling steaks for summer</video:title>  
          <video:description>
            Cook the perfect steak every time.
          </video:description>
        </video:video>

      </url>
    </urlset>
    Tentang bagaimana membuat link2 tersebut. Anda yang tau bagaimana query database yang anda buat.
     
  4. bocahpauk

    bocahpauk Ads.id Starter

    Joined:
    Jan 28, 2015
    Messages:
    88
    Likes Received:
    3
    nambahin agan di atas,
    buat isi sitemapnya, bisa load dari kolom di database yang berisi konten Anda.
    bagusnya, di kolom konten ini kasih url nya sekalian, biar ga repot.

    CMIIW
     

Share This Page