A domain name resolution method, comprising: obtaining, by a server, a domain name resolution request packet; storing, by the server, the obtained domain name resolution request packet in a first cache area; modifying, by the server in the first cache area, header data in the stored domain name resolution request packet, to obtain header data of a domain name resolution response packet corresponding to the stored domain name resolution request packet, comprising: determining a head address pointer of the domain name resolution request packet cached in the first cache area; determining an address pointer offset of to-be-modified data in the domain name resolution request packet cached in the first cache area, the to-be-modified data indicates different data in the respective header data of the domain name resolution request packet and the domain name resolution response packet corresponding to the domain name resolution request packet; positioning the to-be-modified data in the first cache area based on the head address pointer and the address pointer offset; modifying the positioned to-be-modified data into data in the domain name resolution response packet that corresponds to the to-be-modified data; extracting, by the server, a requested record type and a domain name to be resolved in the stored domain name resolution request packet; searching, by the server, a second cache area for pre-stored response data that corresponds to the extracted domain name and has the extracted record type; and combining, by the server, the pre-stored response data with the modified domain name resolution request packet, to obtain the domain name resolution response packet. obtaining, by a server, a domain name resolution request packet; storing, by the server, the obtained domain name resolution request packet in a first cache area; modifying, by the server in the first cache area, header data in the stored domain name resolution request packet, to obtain header data of a domain name resolution response packet corresponding to the stored domain name resolution request packet, comprising: determining a head address pointer of the domain name resolution request packet cached in the first cache area; determining an address pointer offset of to-be-modified data in the domain name resolution request packet cached in the first cache area, the to-be-modified data indicates different data in the respective header data of the domain name resolution request packet and the domain name resolution response packet corresponding to the domain name resolution request packet; positioning the to-be-modified data in the first cache area based on the head address pointer and the address pointer offset; modifying the positioned to-be-modified data into data in the domain name resolution response packet that corresponds to the to-be-modified data; determining a head address pointer of the domain name resolution request packet cached in the first cache area; determining an address pointer offset of to-be-modified data in the domain name resolution request packet cached in the first cache area, the to-be-modified data indicates different data in the respective header data of the domain name resolution request packet and the domain name resolution response packet corresponding to the domain name resolution request packet; positioning the to-be-modified data in the first cache area based on the head address pointer and the address pointer offset; modifying the positioned to-be-modified data into data in the domain name resolution response packet that corresponds to the to-be-modified data; extracting, by the server, a requested record type and a domain name to be resolved in the stored domain name resolution request packet; searching, by the server, a second cache area for pre-stored response data that corresponds to the extracted domain name and has the extracted record type; and combining, by the server, the pre-stored response data with the modified domain name resolution request packet, to obtain the domain name resolution response packet.