Skip to main content

First post using stackedit

Welcome to StackEdit! Hey! I’m your first Markdown document in StackEdit 1 . Don’t delete me, I’m very helpful! I can be recovered anyway in the Utils tab of the Settings dialog. Documents StackEdit stores your documents in your browser, which means all your documents are automatically saved locally and are accessible offline! Note: StackEdit is accessible offline after the application has been loaded for the first time. Your local documents are not shared between different browsers or computers. Clearing your browser’s data may delete all your local documents! Make sure your documents are synchronized with Google Drive or Dropbox (check out the Synchronization section). Create a document The document panel is accessible using the button in the navigation bar. You can create a new document by clicking New document in the document panel. Switch to another document All your local documents are listed in the document panel. You can switch from one to anoth

Làm thế nào để thêm trang blogspot của bạn vào Google sitemap

Đương nhiên khi tạo ra 1 blog, và đặt ở chế độ public, thì bạn muốn mọi người có thể đọc nó. Một cách tiếp cận đơn giản nhất chính là qua Google.
Nếu bạn không chủ động thêm blog của bạn vào cơ sở dữ liệu của Google, thì thậm chí tới vài năm sau Google cũng không index trang blog của bạn.
Để thêm trang web của bạn vào CSDL của Google, bạn hãy làm theo các bước sau:

1/Google Sitemaps là gì?
Google Sitemaps là một tiện ích trong webmaster tool được phát triển bởi Google với mục đích cung cấp một cách thức đơn giản cho người dùng có thể mô tả cấu trúc website của mình nhằm tối ưu hóa Google search, giúp cho các spiders của Google dễ dàng hơn trong việc đọc thông tin và đánh chỉ mục cho website của bạn. Việc này sẽ giúp cho web của bạn có khả năng xuất hiện cao hơn trong các kết quả được trả về từ các kết quả tìm kiếm của Google. Nghĩa là bạn sẽ có nhiều visitors hơn đến thăm website của mình.

2/Add blog của bạn vào Google sitemaps

- Đăng nhập vào google sitemaps: Nhấn vào đây
Nếu chưa có google account thì bạn cần phải đăng ký 1 account với google

-Sau khi đăng nhập vào Dashboard, nhập URL blog mà bạn muốn add vào google sitemaps(1), sau đó nhấn "Add Site"(2)











-Nhấn Verify để xác nhận đó là blog của bạn(3)










-Tại mục "Choose verification method" chọn "Add a meta tag"(3a), sau đó copy đoạn code mà google cung cấp(3b)












-Login vào Blogger bằng 1 khung cửa sổ mới( Đừng tắt khung cửa sổ đang làm việc nhé, vì lát nữa bạn còn phải nhấn nút "Verify"). Chọn thẻ "Template"--->"Edit HTML" và paste đoan code mà google cung cấp vào ngay dưới thẻ head. (Xem hình bên dưới)









Nhấn Save Tamplate để lưu lại.

-Quay trở lại Google sitemaps, nhấn "Verify" để hoàn tất công việc còn dang dỡ. Bạn đã hoàn tất thủ tục xác nhận chủ sở hữu blog mà bạn đăng ký.

-Trở lại Dashboard của google sitemaps. Nhấn "Add" để add sitemap cho blog của bạn(4). Ở Khung "Choose Type" bạn chon "Add General Sitemap"(5)














Paste đoạn code atom.xml?redirect=false&start-index=1&max-results=100 vào khung phía dưới(6). Nghĩa là URL sitemaps của bạn là: http://yourblogurl.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=100

Nhấn Add General Web Sitemap để hoàn tất. Xong, bạn đã hoàn tất thủ tục để google đánh chỉ mục(index) các entry cho blog của bạn rồi đó.

(Note: bạn có thể thay
atom.xml?redirect=false&start-index=1&max-results=100

bằng
rss.xml?redirect=false&start-index=1&max-results=100
Cả hai cái đều có tác dụng như nhau)

Note:
Hầu hết các bạn khi add sitemap cho blog của mình đều chỉ thêm vào atom.xml hoặc rss.xml tại bước 6(http://yourblogurl.blogspot.com/atom.xml hoặc http://yourblogurl.blogspot.com/rss.xml) Điều này sẽ dẫn đến 2 hệ quả

1. Google gặp khó khăn trong việc index blog của bạn nếu bạn dùng feed redirection (các bạn dùng feedburner hay gặp lỗi khi index bog của mình vì URL của các entry bị chuyển hướng sang feedburner) --->Thêm vào ?redirect=false phía sau atom.xml sẽ ngăn việc feed của bạn bị chuyển hướng khi google index các entry trong blog của bạn.

2. Số entry tối đa mà google mặc định cho feed chỉ là 25 post mới nhất. Như vậy Google chỉ lưu lại 25 entries mới nhất của bạn trong sitemap của nó---> Bạn cần phải thay đổi mặc định này bằng đoạn code &start-index=1&max-results=100 . Đoạn code này báo cho google biết nó cần index blog của bạn với 100 posts mới nhất. Nếu blog của bạn nhiều hơn 100 posts? Bạn cần phải add thêm 1 sitemap với đoạn code:

atom.xml?redirect=false&start-index=101&max-results=100

Bạn để ý số 101 nhé, nó báo cho google biết là cần index 100 entries trong blog của bạn, bắt đầu từ entry số 101. Nếu bạn có nhiều hơn 200 post thì bạn lại phải add thêm 1 sitemap nữa:

atom.xml?redirect=false&start-index=201&max-results=100

Cứ tiếp tục như thế v.v...

Comments

Popular posts from this blog

Sử dụng gcov để kiểm tra sourcecode

Sau khi hoàn thành source code, trong test phase, có thể chúng ta cần kiểm tra tập test case của chúng ta có coverage tất cả các trường hợp có thể xảy ra hay không, hành động này gọi là test code coverage. Có nhiều tool miễn phí cũng như có phí để thực hiện việc này, nhưng đơn giản nhất là sử dụng công cụ gcov đi kèm trong trình biên dịch gcc. Để đọc chi tiết hơn về gcov, bạn có thể vào http://gcc.gnu.org/onlinedocs/gcc/Gcov.html#Gcov, hoặc tìm kiếm với Google. Sử dụng gcov khá đơn giản, giả sử ta có 3 file a.c, b.c và c.c. Truy cập vào thư mục chứa 3 files này, gõ: gcc -fprofile-arcs -ftest-coverage a.c b.c c.c Mặc định gcc sẽ tạo ra file a.out trong thư mục hiện thời, cùng với 3 file a.gcno, b.gcno và c.gcno. Sau đó bạn chạy file a.out với các parameter cần thiết, sẽ tạo ra thêm 3 file a.gcda, b.gcda và c.gcda. Sau đó, giả sử cần phân tích file b.c, chúng ta gõ: gcov b.c Có hai tham số thường dùng là -b và -f: -b: thêm thông tin về branch trong code. -f: thêm thông tin về hàm. Thông

Getting started with Cryptpad in Ubuntu: step by step

Cryptpad is an open source collaborative editor which is hosted at: https://github.com/cjdelisle/cryptpad It is easy to clone the github repository and start to try, but if you are a newbie, there maybe some difficulties. Suppose that you have a clean Ubuntu machine, and want to try with Cryptpad, you can follow these steps: 1. Download mongodb for Linux: https://www.mongodb.org/downloads 2. Unzip the file you got to a location you want. You will start mongodb from there, or add this directory to your PATH variable so you can start mongodb from anywhere. 3. Suppose that you chose the easier way, i.e start mongodb from its directory. 4. Open Terminal (Ctrl + Alt + T for shortcut), move to the directory of mongodb 5. Type: mkdir db mongod --dbpath=./db These above commands will first, create a directory 'db' insider the directory mongodb, then start mongodb server. 6. Keep the terminal with mongodb server running 7. Open another terminal (Ctrl + Shift +

First post using stackedit

Welcome to StackEdit! Hey! I’m your first Markdown document in StackEdit 1 . Don’t delete me, I’m very helpful! I can be recovered anyway in the Utils tab of the Settings dialog. Documents StackEdit stores your documents in your browser, which means all your documents are automatically saved locally and are accessible offline! Note: StackEdit is accessible offline after the application has been loaded for the first time. Your local documents are not shared between different browsers or computers. Clearing your browser’s data may delete all your local documents! Make sure your documents are synchronized with Google Drive or Dropbox (check out the Synchronization section). Create a document The document panel is accessible using the button in the navigation bar. You can create a new document by clicking New document in the document panel. Switch to another document All your local documents are listed in the document panel. You can switch from one to anoth