Question Answering System (QAS) are basically developed to extract precise answers from a set of unstructured documents whose contents are in natural language. Information retrieval techniques are used to extract the correct answers for the natural language queries. But in recent years, when the idea of ontology came, it has been moving from the realm of artificial laboratories to the desktops of domain experts. It is viewed as a structured form of data where we can retrieve the data in the form of triplets. SPARQL, a semantic query language can be used to query from an ontology knowledge base. This paper focus on automatic query generation for natural language questions, thereby developing a domain specific natural language question answering system for ontology. Accuracy of the system is improved by using the DBpedia ontology for extracting some sort of information about the domain.