The aim of Vehicular Ad Hoc Networks (VANETs) is to provide drivers and passengers with various applications and services for comfortable transportation by supporting traffic efficiency and safety. However, the traditional VANETs face various technical challenges in meeting the basic requirements of intelligent transportation systems such as scalability, flexibility and management due to the ever-increasing number of intelligent vehicles. With its flexible, programmable, scalable network structure, Software Defined Networks (SDNs) are candidates for providing solutions to the problems experienced. The architecture, which was created by adapting the SDN paradigm to the traditional VANET is simply called SD-VANET. This new architecture allows easy scaling of the network and flexible network management. Despite the advantages of SD-VANET architecture, it is also vulnerable to cyberattack threats such as Distributed Denial Of Service (DDoS). In this study, different machine learning classifiers were used to detect DDoS attacks targeting SD-VANETs. First, a dataset containing features of normal network traffic and DDoS attack network traffic was obtained from an experimentally created SD-VANET topology. Then the Minimum Redundancy Maximum Relevance (MRMR) feature selection algorithm was used to select the most distinctive features of the dataset. Machine learning classifiers were trained and tested with both original and feature selection applied datasets. Moreover, in the learning phase, hyperparameter optimization for the classifiers was applied using the Bayesian optimization method. According to the experimental results, the highest accuracy score obtained was 99.35% with MRMR feature selection and Bayesian optimization-based decision tree classifier. The results demonstrate that the MRMR feature selection and Bayesian optimizationbased classifier approach have been successful for the detection of DDoS attacks on SD-VANETs.