Hello My Website problem is that you can type anything with my website URL like www.sharmainfoway.com/anything.... the website still will open the home page. I want it that it should display page not found error if the page doesn't exist. The above issue is giving me a major problem in SEO, search engine crawls the page based on any URL attached to my site like mysite.com/1 or mysite.com/2.... and indexes that. That causes the irrelevant info crawled and that creates irrelevance problem for search engines. i have hosted site with godaddy.
This should not be causing you any problems from an SEO perspective. When a request a URL that does not exist on your site, your Apache web server at GoDaddy is returning a 404 Not Found HTTP status code. This tells the crawlers that the requested page does NOT exist. So they would NOT index the content returned under the requested URL. It does, however, look like GoDaddy has your home page setup as your custom 404 page. I would suggest creating a custom 404 page that has the page not found messaging on it to explain to a user that they have requested a URL that does not exist, but make it look similar to other pages on your site. Include the same navigation (the normal page template - same header, global nav, left nav (if applicable) and footer), and possibly link to additional parts of the site that might not be included in the other navigations on the site. WHATEVER you do be SURE that when your new custom 404 page is in place and someone requests a non-existent URL that: 1) The address in the browser remains the bad URL 2) The content of the custom 404 page is displayed AND most importantly 3) That the HTTP status returned for the request for the non-existent URL is a 404 Not Found status.