Nhận đặt liên kết hợp tác phát triển Liên hệ ngay Liên kết ngay!

Các loại sitemap cho Blogger và cách tạo

Các loại sitemap cho Blogger và cách tạo

Bản chất của sitemap là file xml, tuy nhiên file xml chỉ có bot đọc được chứ người nhìn rất rối. Trong Blogger chúng ta có thể tạo tự động sitemap nhưng nó không tối ưu cho hiển thị người dùng. Vậy sẽ phải tạo ra các sitemap với các mục đích khác nhau như sau

Sitemap dành cho hiển thị

Sitemap này chúng ta sẽ đặt ở trên website, múc đích chủ yếu là để cho người dùng nhìn.

Đầu tiên hãy tạo 1 trang mới, chuyển sang Chế độ xem HTML và dán đoạn code sau vào là xong. Bạn không cần chỉnh sửa gì hết và có ngay 1 sitemap như thế này.

<!--[ Sitemap script DTE, source: dte.web.id/teknis/widget-daftar-isi-tabulasi-blogger ]-->
<script src='//dte-project.github.io/blogger/tabbed-toc.min.js?active=0&load=true&ad=false&date=%25M~%25%20%25D%25%2C%20%25Y%25' defer='defer'></script>

<style>
.tabbed-toc{border:0;font-size:15px}
.tabbed-toc-tabs{width:10em;font-size:14px}
.tabbed-toc-tab{padding:0 15px;border-radius:3px 0 0 3px;position:relative;transition:var(--trans-1);color:inherit}
.tabbed-toc-tab::after{content:'';position:absolute;top:0;bottom:0;right:0;border-right:1px solid var(--linkC);opacity:0}
.tabbed-toc-tab:hover, .tabbed-toc-tab.active{background:var(--transB)}
.tabbed-toc-tab:hover::after, .tabbed-toc-tab.active::after{opacity:1}
.tabbed-toc-tab.active{color:var(--linkC);opacity:.7}
.ltr .tabbed-toc-panels{border-color:var(--contentL)}
.ltr .tabbed-toc-time{position:relative;font-size:12px;opacity:.7}
.tabbed-toc li{padding:5px 7.5px;line-height:1.6em;min-height:40px;display:flex;align-items:center;justify-content:space-between}
.tabbed-toc li >*{padding:0 7.5px; margin:0}
.tabbed-toc a{color:inherit}
.tabbed-toc-title{font-size:16px}
.tabbed-toc-title sup{font-weight:400;font-size:12px;color:var(--linkC)}
.drkM .ltr .tabbed-toc-panels{border-color:rgba(255,255,255,.1)}
.drkM .tabbed-toc-tab.active, .drkM .tabbed-toc-title sup{color:var(--darkL)}
.drkM .tabbed-toc-tab::after{border-color:var(--darkL)}
@media screen and (max-width:750px){
.tabbed-toc nav{display:flex;overflow-x:scroll;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x mandatory; -ms-overflow-style:none;-webkit-overflow-scrolling:touch; /*position:relative;width:calc(100% + 40px);left:-20px;right:-20px;padding:0 20px*/}
.tabbed-toc nav::-webkit-scrollbar{width:0;height:0}
.tabbed-toc nav::-webkit-scrollbar-track{background:transparent}
.tabbed-toc nav::-webkit-scrollbar-thumb{background:transparent;border:none}
.tabbed-toc-tab{border-radius:3px 3px 0 0;white-space:nowrap;flex-shrink:0;scroll-snap-align:start}
.tabbed-toc-tab::after{top:auto;left:0;border-right:0;border-bottom:1px solid var(--linkC)}
.tabbed-toc ol{margin-top:15px;padding:0 15px;list-style:decimal}
.tabbed-toc li{display:list-item;padding:5px 0;overflow:visible;list-style:inherit}
.drkM .tabbed-toc-tab::after{border-color:var(--darkL)}
}
@media screen and (max-width:500px){
.tabbed-toc-title{font-size:15px}
}
</style>

Sitemap để thêm vào Google Search Console

Google Search Console hay trước đây còn được gọi là Google Webmaster Tool. Chúng ta phải thêm sitemap vào đây để Google đọc được dữ liệu website của chúng ta và index.

https://www.minhcristiano.name.vn/atom.xml?redirect=false&start-index=1&max-results=500

Nếu website của bạn có nhiều hơn 500 bài viết có thì hãy gửi thêm sitemap như thế này nữa.

https://www.minhcristiano.name.vn/atom.xml?redirect=false&start-index=501&max-results=500

Sitemap để thêm vào file Robots

Trong Blogger bạn có thể sửa file Robots bằng cách truy cập Cài đặt, kéo xuống Trình thu thập thông tin và lập chỉ mục, bật tùy chọn Bật thẻ tiêu đề robot tùy chỉnh, sau đó bấm vào Robots.txt tùy chỉnh và thêm đoạn dưới đây vào.

User-agent: *
Sitemap: https://www.minhcristiano.name.vn/sitemap.xml

Trong đó https://www.minhcristiano.name.vn/sitemap.xml chính là sitemap. Nhớ thay những phần chữ tô màu thành website của bạn.

About the Author

Blog tổng hợp và chia sẻ những những kiến thức, tài liệu học tập mà mình sưu tầm được. Hi vọng sẽ có ích cho mọi người, rất mong mọi người ủng hộ. Các bạn muốn tham gia đóng góp bài viết trên trang, vui lòng liên hệ mình nhé. Xin cảm ơn!

Đăng nhận xét

MỘT SỐ LƯU Ý KHI BÌNH LUẬN
- Mọi bình luận sai nội quy sẽ bị xóa mà không cần báo trước (xem Nội quy)

- Bấm Thông báo cho tôi bên dưới khung bình luận để nhận thông báo khi admin trả lời

- Để bình luận kèm hình ảnh, bạn hãy vào trang Upload ảnh sau đó kéo thả để upload hình ảnh lên.

- Không spam trong khung bình luận, hạn chế viết tắt..
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.