What are absolute and relative addresses?

Source: Internet
Author: User

What are absolute and relative addresses?

In computer operation learning and Internet use, we often have access to the concept of absolute and relative addresses. Here, we will focus on the Internet. What are the differences between absolute and relative addresses when using websites?

Absolute address: An Independent address on the Internet. This address can be used on any website to directly access the target webpage. Contains the primary domain name and directory address.

Relative address: relative to the website address, when the domain name changes, the "absolute address" of the relative address also changes.

Assume that two websites A: www.seowhy.com B: www.baidu.com

Each of these two websites has a webpage under the root directory, for example, 404.html.

On these two websites, we make the same link/404.html (relative address)

Website a directs to www.seowhy.com/404.html

Website B points to www.baidu.com/404.html

If you want to direct/404.html on website a to website B, you need to write www.baidu.com/404.html (absolute address ).

A deep understanding of the concept of relative and absolute addresses is of great significance to Seo.

1. Use an absolute address when making an in-site link. For example: Long Tail keyword this link anchor text uses absolute address: http://www.seowhy.com/2_76_zh.html, then when this article is reproduced or crawled by the RSS reader, the link will not change. On the contrary, if the relative address:/2_76_zh.html is used, this article may be changed to another website domain name/2_76_zh.html when it is reproduced on another website.

2. Each link on the home page must use an absolute address. In particular, for websites with independent IP addresses, using absolute addresses can prevent websites from being mirrored by other domain names. If www.seowhy.com Homepage uses relative addresses, when other domain names direct to the IP address of this site, the content of that site is exactly the same as that of this site in the search engine and the user's opinion. After the Homepage uses an absolute address, the user clicks for the first time and then comes to www.seowhy.com domain name.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.