Nether Portal Linking
Nether portals do not permanently "remember" what portal in the other dimension they connect to. Often this can result in multiple Overworld portals connecting to the same Nether portal, or in returning to the Overworld at a different portal than you started at.
This happens because whenever the player or other entity enters the portal, the game uses the coordinates of the entry point to calculate where to go in the target dimension. It then searches the target dimension for the closest portal and sends the player there, or if it can't find a portal close enough to qualify, it automatically creates a new portal as close as possible to the calculated coordinates and sends the player to it.
Here's how that works:
1. Start with the exact starting coordinates (Xstart,Y,Zstart) when entering the portal.
2. If traveling from Overworld to Nether divide by 8:
Xend = Xstart / 8 | Zend = Zstart / 8
If traveling from Nether to Overworld multiply by 8:
Xend = Xstart x 8 | Zend = Zstart x 8
In both cases, keep the Y coordinate unchanged.
3. Use the closest active portal within a 17×17 chunk area centered on the calculated coordinates (Xend,Y,Zend). If there is no portal close enough, create a new portal at a "safe" location. In some cases the game may create a platform around the portal over lava or water.
Note that when going from the Overworld to the Nether, it often happens that the target Nether coordinates are inside a mountain of netherrack from floor to ceiling, which leaves the game nowhere it can build a portal near the calculated coordinates. If this is the case and the game can't find an existing portal within the 17×17 chunk area, it creates a new portal as close as possible to the calculated coordinates, but this new portal may be displaced so far that it can't reach the original Overworld portal. This is one reason you sometimes can't return to the original Overworld portal you entered.
For a more detailed explanation visit the Minecraft Wiki.
We were working on a nether hub, but we can only build 3 portals. From the 4 portal it is linked with the first portal. The portals are more then 500 block away from each other pls fix it.
Related issues
is duplicated by
Comments


Okay I can try that but we have already tried 4 new portals but all 4 links

So today i run to the location in the nether with help of locator map because coordinates are cheats and the location is not in lava or in netherrack so why will the portal not open from the overworld to the nether ?

Coordinates have not been classified as cheats in the game for quite a long time, although perhaps you meant that you regard using them as cheating per the rules you've all agreed to.
If your map shows that you're at the correct corresponding location in the Nether but the game still doesn't generate a portal there, the only possible reason (other than a bug) is that there was already an existing portal in the Nether within 128 blocks. This is the problem with trying to link a portal starting on the Overworld side: It can very easily link to an existing portal that's, say, 100 blocks away in the Nether, but when you try to return, the Nether side tries to link back to the Overworld 800 blocks away from the original portal, which is too far so it generates a new Overworld side. That's why it's always much easier to link portals by starting from the Nether side, because wherever it generates the Overworld portal, when you return the Nether side will almost always be within range and can be found. (I think the only exception is if it tries to generate the Overworld side in the middle of an ocean.)
What should work is for you to go back to that location you found in the Nether and build a new portal there. Then use it to return to the Overworld. I think you'll find that you come out at the Overworld portal you wanted, and that from then on the Overworld side will link back to the Nether side reliably. Please try that and let us know if it works.
By the way, I should have thought more carefully about what you said above, that your portals are 500 blocks apart. 500 blocks in the Overworld is the equivalent of about 63 blocks in the Nether. If all your Overworld portals were exactly 500 blocks apart, all their corresponding points in the Nether are within a 64x64 block area. Since the game searches up to 128 blocks when looking for a portal to link to, they could all link to a single Nether side portal if it happens to generate at the right spot. Again, it's always easier to start on the Nether side and let it generate the Overworld portals. Once you've established a link, you can break and rebuild the Overworld side a small distance away and it will usually link back to the same Nether side. (You can also reposition the Nether side this way, but you can only move it a very few blocks—no more than 15—before it won't relink properly any more, because 16 blocks in the Nether corresponds to 128 blocks in the Overworld.)

Problem solved thnx for the help !!!

This is NOT resolved. As seen here:

I still need to see where this is resolved and working as intended as well.

The panel in the description of this report explains how portal linking works. It is intentionally coded to work that way, so it is not considered a bug. The video linked by Nicky Grimson shows exactly what the panel describes:
Note that when going from the Overworld to the Nether, it often happens that the target Nether coordinates are inside a mountain of netherrack from floor to ceiling, which leaves the game nowhere it can build a portal near the calculated coordinates. If this is the case and the game can't find an existing portal within the 17×17 chunk area, it creates a new portal as close as possible to the calculated coordinates, but this new portal may be displaced so far that it can't reach the original Overworld portal.

Ok so I get a portal over lava and it is okay. As long as it is unobstructed.

I understand the frustration, here is a good place to calculate the nether to overworld coords since this has been a bug since the nether was launched. https://nethercalculator.com/
As far as I can tell from the limited information you've given, this is working as intended. Linking nether portals can be quite tricky, but I've never yet seen a case where it was not working as it's designed to.
The most common reason that two Overworld portals link to the same Nether portal even when they are far apart is that an obstruction in the Nether is keeping the game from generating the Nether side near its nominal position (i.e. at coordinates calculated by dividing the Overworld X and Z coordinates by 8). For example, mountains of netherrack that run from the floor to the ceiling of the Nether are very common. If you activate an Overworld portal whose nominal Nether side would be within such a mountain, the game must look for the nearest location where it can generate the Nether side portal. If there is already a portal there, or within 128 blocks of there, it will be used instead of generating a new portal.
To solve this problem, use the coordinates of your Overworld portals to calculate the nominal positions of their Nether side portals. At least one of them will be a substantial distance away from the Nether side portal that it actually links to. Use that one to go to the Nether, then dig into the netherrack mountain in the direction of the nominal coordinates. You don't have to go all the way, just make an open space somewhat closer to them. Build a new portal at the location you've reached, and use it to return to the Overworld. You should come out in one of your original Overworld portals. If it's not the one you want, repeat the process using the other Overworld portal.
Also, remember that the game only remembers links between the Overworld and Nether side portals for a short time after you use one. After a minute or two, it falls back to calculating the nominal coordinates in the other dimension, then searching for any portal within 128 blocks before it gives up and generates a new portal as close as possible to the nominal destination. When you're trying to link portals, you can become confused if you travel one way, then quickly return via the same portal. It may seem like they're linked the way you want, but then after a few minutes it stops linking that way. So be sure to test links in both directions and wait a couple of minutes between trips before you decide it's working reliably.
If this discussion doesn't help you resolve your problem, we'll need information about where each portal is (in both dimensions), which ones link with each other, and what you expected to be different. This report will automatically reopen when you reply.