Advances in laser technology have led to ever-increasing laser intensities. As a result, in addition to the amplified spontaneous emission and pedestal, it has become necessary to accurately treat the relativistic rising edge component. This component has not needed much consideration in the past because of its not relativistic intensity. In the previous study, a thin contamination layer was blown away from the target by the rear sheath field due to the relativistic rising edge component, and the target bulk was accelerated by the sheath field due to the main pulse. These indicated that the proton acceleration is not efficient in the target normal sheath acceleration by the ultrahigh intense femtosecond laser if the proton-containing layer is as thin as the contamination layer. Here we employ a double-layer target, making the second (rear) layer thick enough not to be blown away by the rising edge, so that the second layer is accelerated by the main pulse. The first layer is composed of heavy ions to reduce the total thickness of the target for efficient proton acceleration. We investigate an optimal design of a double-layer target for proton acceleration by the ultrahigh intense femtosecond laser considering the relativistic rising edge using two-dimensional particle-in-cell simulations. We also discuss how to optimize the design of such a double-layer target and find that it can be designed with two conditions: the first layer is not penetrated by hole boring, and the second layer is not blown away by the rising edge.