PurposeThe main purpose of this study is to explore how online food delivery (OFD) service quality influences customer satisfaction and customer loyalty.Design/methodology/approachA total of 307 useable data collected from existing users of OFD services in Malaysia are used to verify the proposed hypotheses through partial least squares structural equation modelling (PLS-SEM). Necessary condition analysis (NCA) is also conducted to identify the necessary conditions for customer satisfaction and customer loyalty.FindingsThe PLS results show that five dimensions of OFD service quality, including assurance, maintenance of meal quality and hygiene, reliability, security and system operation, are significant to customer satisfaction. Traceability is found to have no significant influence on customer satisfaction. Furthermore, customer satisfaction is a significant predictor of customer loyalty. The NCA results show that all dimensions of OFD service quality are necessary conditions for customer satisfaction and customer satisfaction is a necessary condition for customer loyalty.Originality/valuePast studies have mainly utilised the sufficiency logic to understand customer satisfaction and customer loyalty in the context of the OFD. This study is the first to perform NCA that relies on necessity logic to identify necessary conditions for customer satisfaction and customer loyalty.