Having arrived in Azerbaijan after visiting Armenia, you will certainly be allowed to enter the country after a couple of general questions related to visiting Armenia. The reason is that Armenia is officially an aggressor country that has occupied 20% of the territories accepted by the international community as Azerbaijani. Unfortunately, similar situations can be seen in other countries that have territorial conflicts with neighboring states.
If you visited Nagorno-Karabakh as part of your visit to Armenia, you most likely will not be allowed to enter Azerbaijan. For the reason that in this case you are a person who illegally visited the territory of Azerbaijan Republic. That is, a visit to Nagorno-Karabakh by Armenian Republic is a violation of the law of Azerbaijan. Tourists visiting Armenia are advised not to violate the legislation of the Republic of Azerbaijan.
Citizens of Armenian nationality, with Armenian surnames from other countries, will probably also be denied entry to Azerbaijan. This is due to the fact that currently in Azerbaijan, more than 10% of the population are refugees, internally displaced persons who have lost both their homes and lands, and many relatives as a result of the aggression of Armenian nationalists from Armenian terrorist organizations. With so many representatives of its population who suffered from Armenian terrorists at one time, Azerbaijan cannot guarantee complete safety to tourists with Armenian surnames.
Therefore, we recommend waiting for the settlement of the conflict between Azerbaijan and Armenia to citizens of Republic of Armenia, Armenians from other countries, citizens with Armenian surnames and citizens of any nationality who wonder to see Nagorno-Karabakh.