Ordinary Portland cement (OPC) is a conventional material used to construct rigid pavement that emits large amounts of carbon dioxide (CO2) during its manufacturing process, which is bad for the environment. It is also claimed that OPC is susceptible to acid attack, which increases the maintenance cost of rigid pavement. Therefore, a fly ash based geopolymer is proposed as a material for rigid pavement application as it releases lesser amounts of CO2 during the synthesis process and has higher acid resistance compared to OPC. This current study optimizes the formulation to produce fly ash based geopolymer with the highest compressive strength. In addition, the durability of fly ash based geopolymer concrete and OPC concrete in an acidic environment is also determined and compared. The results show that the optimum value of sodium hydroxide concentration, the ratio of sodium silicate to sodium hydroxide, and the ratio of solid-to-liquid for fly ash based geopolymer are 10 M, 2.0, and 2.5, respectively, with a maximum compressive strength of 47 MPa. The results also highlight that the durability of fly ash based geopolymer is higher than that of OPC concrete, indicating that fly ash based geopolymer is a better material for rigid pavement applications, with a percentage of compressive strength loss of 7.38% to 21.94% for OPC concrete. This current study contributes to the field of knowledge by providing a reference for future development of fly ash based geopolymer for rigid pavement applications.