Travelling for the purpose of visitation is prohibited except to the three mosques:
So whoever travels to a place other than the Sacred House of Allah and calls upon someone other than Allah there has offered his prayer and worship to someone other than Allah. Yet the Messenger of Allah ﷺ forbade travelling to any mosque other than the three mosques, provided that there is no special reason for travelling to it, except for the three mosques, because these three mosques were built by the Prophets (peace be upon them) and they also called the people at large to travel to them. So these three mosques have a special distinction that other mosques do not have. Therefore, travelling to any mosque other than these three is, by the agreement of the four Imams, not sunnah; rather, the Messenger of Allah ﷺ has forbidden it.
So how can it be permissible to travel to the dead whose graves have been made places of worship, idols and festival gatherings? And the strange thing is that they are regarded as partners of Allah and as removers of difficulties, to the point that most of them do not give Hajj to the Sacred House of Allah as much importance as is given to attending their graves! Shirk and the worship of graves have been declared superior to tawhid and the worship of Allah, as is the condition of the polytheists today. Concerning shirk, Allah the Exalted says:
إِنَّ اللَّهَ لَا يَغْفِرُ أَن يُشْرَكَ بِهِ وَيَغْفِرُ مَا دُونَ ذَٰلِكَ لِمَن يَشَاءُ ۚ وَمَن يُشْرِكْ بِاللَّهِ فَقَدْ ضَلَّ ضَلَالًا بَعِيدًا ﴿١١٦﴾ إِن يَدْعُونَ مِن دُونِهِ إِلَّا إِنَاثًا وَإِن يَدْعُونَ إِلَّا شَيْطَانًا مَّرِيدًا ﴿١١٧﴾ لَّعَنَهُ اللَّهُ
“With Allah, only shirk is not forgiven; everything other than that can be forgiven for whomever He wills to forgive. Whoever associates anyone with Allah has strayed far into misguidance. They take goddesses as objects of worship instead of Allah and call upon a rebellious Satan, whom Allah has cursed.”