pages like this open in my site and won't throw 404 page:

> https://www.farafan-market.ir/component/content/article?id=242:
> https://www.farafan-market.ir/component/content/category/175-other

what kind of pages are these and WHY should they be accessible? what can i do about these? I don't want any category or page that is not in the menus to be shown on the website.

another problem is when i add something in the end of the site's URL, instead of opening 404 page, the main page opens up?!!!!

  • It looks like you have some issues with your routing and your .htaccess file. i would look at the .htaccess file for issues with redirecting to the homepage. The example URLs posted above look like they link to an article, but do not have an associated menu Itemid to resolve the correct URL.
    – Terry Carter
    Jan 3, 2018 at 23:29
  • 1.the URLs above have an associated menu itemid. i don't know why they're accessible like this. 2.how can i find the problem in .htaccess file? @Terry Carter
    – kiasaty
    Jan 4, 2018 at 5:37

1 Answer 1


When you do not have any associated menu item, Joomla will default to the homepage menu item. The urls from other components will be generated appropriately using component/componentname syntax.

To avoid generating such URLs for your Joomla articles, create menu items for all your article categories. If you have too many categories, create the menu items for at least TOP level categories.


  • Category 1 menu item
    • Sub Category 1 menu item
  • Category 2 menu item

Now all your articles will take alias/url paths from these menu items.

Please note that creating these menu items will not make old URLs with component/content/ pattern invalid. Those urls will continue to work and you should avoid referencing such URLs from other page so that search engines don't see them.

  • I disallowed /component/ in robot.txt file to prevent search engines to see such pages.
    – kiasaty
    Jan 6, 2018 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.