Bạn muốn yêu cầu phần mềm, khóa học hay kiến thức gì hãy liên hệ ngay Hợp tác cùng phát triển nhé !

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

Founder và CEO tại Minh CRISTIANO Blog. Tại đây, mình sẽ chia sẻ một số kiến thức học tập, các phần mềm liên quan & các thông báo quan trọng của blog.

Đăng nhận xét

Cookie Consent
Chúng tôi cung cấp cookie trên trang web này để phân tích lưu lượng truy cập, ghi nhớ tùy chọn của bạn và tối ưu hóa trải nghiệm của bạn.
Xem chi tiết
Oops!
Có vẻ như đã xảy ra sự cố với kết nối internet của bạn. Vui lòng kết nối với internet và tiếp tục trải nghiệm của bạn.
AdBlock Detected!
Chúng tôi đã phát hiện ra rằng bạn đang sử dụng plugin chặn quảng cáo trong trình duyệt của mình.
Doanh thu chúng tôi kiếm được từ quảng cáo được sử dụng để quản lý blog này, chúng tôi yêu cầu bạn đưa blog của chúng tôi vào danh sách bỏ chặn trong plugin chặn quảng cáo của bạn.
Site is Blocked
Xin lỗi ! Blog này không khả dụng ở quốc gia của bạn.