While it is very common to port match an intake manifold to a set of cylinder heads to ensure that there is proper port alignment so that the air /fuel mixture can enter the intake side of the head without restriction, much less has been discussed about the flow of exhaust out of the head and into the exhaust headers. The difference between a vehicle that runs well, versus one that runs circles around similar vehicles, often comes down to the details and the level of attention that the enthusiast applies toward maximizing performance and efficiency. This particularly applies to the exhaust side of the performance equation. A high-flow exhaust system starts at the exit of the cylinder head, and port-matching a set of headers is highly recommended to maximize performance.
Never assume that a set of headers will align properly with the cylinder head of your choice. Unless the header manufacturer is using header flanges that have been cut on a CNC or water-jet machine, be wary of the port alignment. The majority of header flanges are die-stamped out of mild steel. As the die accumulates more stamping time, the header flange will begin to lose precision. The same manufacturer's part number may have perfect alignment at the beginning of its life cycle and poor alignment by the time the die is replaced.
Steve DuSold of DuSold Enterprises states, "Port matching of exhaust manifolds and headers is an old racer's trick and should be the first thing done before other exhaust components are installed. Any material on the header that restricts the flow of exhaust from the head will have a detrimental effect on torque and horsepower output. It doesn't matter if the headers are very expensive 'premium' brands or less expensive alternatives, each header should be checked against a cylinder-head template and repaired according to the port-mismatches found, to maximize performance. To ensure a leak-free fit and optimize the flow of exhaust out of the head and into the header, the header must have port openings that are larger than the cylinder-head port; don't port match a cylinder head to an exhaust-manifold gasket."
Header-port matching can be...
Header-port matching can be done with the cylinder heads installed on the engine or on a work-bench. The passenger side header from a set of "premium" long-tubes for a '73-77 A-body with D-port heads is being removed from the engine bay to allow access to the head ports.
Follow along as we show you how to create a cylinder-head exhaust-port template, and then perform the most common port-matching repair procedures on headers. Depending on your level of skill and access to tools, you can follow the steps outlined and have peace of mind that you've eliminated an exhaust restriction.
Tools & Supplies
Grinding tools
Header bolts
Marking pen
Razor blade/scissors/hole punch
Poster board
Welding and brazing torch
Welding and brazing rods
3/8-inch bolts with flat washers and nuts
Header And Header-Port Matching Tips
Always verify that the template you created for a single head lines up properly with the opposing side's cylinder head before beginning repairs on the "other" header.
Before brazing or welding can begin, the area to be repaired has to be free of any surface contaminants.
An MAPP gas torch can be used to braze, but use a 1/16-inch pre-fluxed brass rod, since the MAPP gas is cooler than a traditional oxygen/acetylene torch.
A MIG welder with 0.025-0.035 wire is the fastest and easiest way to weld a bead around the header tube-to-flange junction. A 110-volt MIG welder will work on 5/16-inch flanges, while a 220-volt welder may be required for thicker 3/8-inch flanges.
An oxygen propylene (propane) torch kit is capable of welding around the header tube-to-flange junction, but much like the 110-volt MIG welder, thicker 3/8-inch header flanges may pose a problem.
Welding and brazing brass are skills that are developed over time with practice. For beginners, practice on expendable parts.
For frequent header-port matching repairs, strongly consider using a junk cylinder head and having a machine shop slice off approximately 1 inch from the exhaust side. Paint or powdercoat the head slice white to allow a good contrast to the exhaust header that you are working on.

Supplies to create a cylinder-head...

Supplies to create a cylinder-head exhaust-port template are minimal and include poster board, a marker, a razor blade (hole punch optional), and a header gasket.

A header gasket is placed...

A header gasket is placed on the poster board and the gasket outline and bolt-holes are traced with a marking pen. A line is then drawn across the poster board and cut down to 4-inches in width.

The bolt holes are then cut...

The bolt holes are then cut out with a razor blade and the mounting hardware is readied. A total of six 2-inch long 3/8-inch bolts, flat washers, and nuts are all that is necessary for installation (four shown).

Next, the poster board is...

Next, the poster board is taken to the cylinder head and the template's bolt holes are lined up. A 2-inch bolt is then threaded in the front cylinder's exhaust bolt hole, the flat washer is slid over it, and the nut is threaded on, so that the poster board is just tight enough against the head to allow proper alignment of the other bolts.

The remaining bolts are installed...

The remaining bolts are installed from front to rear through the template as previously described. After the template is affixed, the nuts are tightened so that the poster board is flat against the exhaust ports.

The outline of the head ports...

The outline of the head ports is traced by using a pencil or by applying pressure with a finger to leave an impression of the exhaust ports in the poster board.
Pontiac exhaust manifolds, including the log-style and high-performance ones, such as the Ram Air III or long-branch, generally have excellent port matches from the factory.
Custom headers generally have 3/8- or 1/2-inch header-flange thickness and are CNC machined from 1018 cold rolled steel or 304 stainless steel. If you are having custom headers manufactured, ask the manufacturer about the flange construction and provide them with a cylinder-head exhaust template, so it is clear from the outset that you want perfect head-to-header port alignment.
Stainless-steel flanges and headers can be repaired using the same procedures outlined in the article. However, stainless brazing and welding is best left to a professional, as it takes years to acquire the skills to successfully perform the repairs.
Conclusion
According to Steve DuSold, "Even the most expensive production headers can have mismatch problems with the cylinder head. I commonly see better port alignment on the premium headers, but not always.

Next, the template is removed...

Next, the template is removed and turned over to examine the impression marks and ensure that they are visible.

A fine marker is employed...

A fine marker is employed to carefully trace around the exhaust ports.

Once done, a razor blade cuts...

Once done, a razor blade cuts out the traced areas. (Take your time and have several new razor blades at the ready, as they will wear quickly and you do not want to tear the paper.) Precision in tracing and cutting can't be emphasized enough, as the template will dictate what work will be performed on the exhaust header(s).
"In addition to port alignment, you have to make sure that the header flange is level. Mild deviations in port alignment and flange straightness are to be expected, but major problems are time-consuming and expensive to correct. As the number of issues that a header has with port-alignment grows, so too does the adverse effect on performance. Perfectly aligned headers may only pick up 5-10 hp over non-aligned headers, but a set of headers with issues like those demonstrated could cost you 20-30 hp.
"If you blow out header gaskets on a regular basis, it usually isn't the fault of the gasket or installation, but rather a poorly aligned header tube."
All headers are not created equal, so if you have port-alignment issues and the repair is anything more than a few quick minutes with a grinder, make a determination as to whether or not the headers are worth fixing and you have the resources and skill level necessary to get the job done. If the headers are worth keeping, DuSold Enterprises can perform the necessary repairs and charges are based on the time required to do it. Estimates are given over the phone, and once the header(s) and template are shipped in, a firm quote is provided.
If you are in the market for headers, research the available offerings carefully and have a cylinder-head template prepared to bolt up to the header as soon as the box arrives. If the ports aren't aligned to your satisfaction, contact the manufacturer and return the headers. If a second set from the same manufacturer has the same problems, either switch brands or determine if it is cost-effective to fix the headers, over having a custom set manufactured.
Pontiac headers are notoriously difficult to install, especially on well-equipped street cars, so it would be a shame to go through the time, money, and effort to install them, only to end up with no gains in performance. If you already have headers installed and want to maximize their efficiency, create a template and see how they align. You might be pleasantly surprised or "red-faced" angry, but the only way to know for sure is to give it a try.

With the ports cut out, the...

With the ports cut out, the template is turned over and examined, and then matched up with the head ports again to ensure that there are no tracing or cutting errors.

The template is then bolted...

The template is then bolted to the header with two bolts and each port is carefully examined to determine if there is proper header-to-port alignment. Ultimately, the header ports must be slightly bigger than the port opening in the head. In this case, there was an excellent port match, as the header was not protruding into the exhaust-port openings and the tubes were just slightly larger than the cylinder-head port openings.

Since no repair work was necessary...

Since no repair work was necessary on the passenger header, a "budget" mid-length set of headers for the same application was donated to determine if either of the two headers would require repair. After putting the template up against both headers, the driver-side header was excellent for illustration purposes, as every port would require modification! Note how the header flange is visible through each port opening.

The worst mismatch is on the...

The worst mismatch is on the front header tube. Note the large amount of header material visible through the template, and the header tube is 0.226-inch from the left edge of the template. This tube will require two repairs, one to remove the excess material in the port and a second where the tube is brazed to add material so that there is proper port alignment.

The first procedure will be...

The first procedure will be to remove the excess material, so a marking pen is used to scribe the material hanging into the port opening.

The template is removed, and...

The template is removed, and an air-powered die grinder with a carbide-cutting bit is used to remove the excess material. As it's removed, the cut is blended back so that the exhaust flow can smoothly transition into the header. After removing the material that was scribed, the header template is placed back onto the header and the port alignment is checked. After verifying a port match, Steve examines the outside of the tube to ensure that the grinding operation didn't break though the tube wall. It didn't, so the first repair procedure is complete.

To repair the portion of the...

To repair the portion of the header tube that was 0.226-inch out will require that material be added. To accomplish this, an oxygen/acetylene torch and a 3/32-inch pre-fluxed brass rod are used. A No. 3 welding tip with a "neutral flame" is established and the brass is slowly built up to close the gap. The goal is to build up just a bit of excess material, so the tube can be ground back to the correct size.

The header is allowed to cool...

The header is allowed to cool and the template is put back in position. Since the brass had not completely filled in the missing material, additional brass had to be added. This time a No. 2 welding tip was employed to reduce the heat, so the brass that was originally added didn't melt and fall down the tube. Note how much brass was required to fill the gap.

Once the material is added,...

Once the material is added, the brass that was built up has to be ground flat with the header flange. A 6-inch air grinder with a 24-grit pad quickly leveled out the brass braze.

The template was lined up...

The template was lined up again and checked to see how much material would need to be ground out for perfect port alignment. Notice the small amount of brass showing by both of Steve's thumb.

An air-grinder and carbide...

An air-grinder and carbide bit was used to remove the excess material and then blend the inner edge of the brass back to promote better flow. The process is done slowly and methodically, and each small change is reviewed against the template until it is perfectly aligned. Rather than continuing to repair the header's other three tubes, which would demonstrate the same procedures, the header is moved over to the TIG welding station and clamped in a vise.

A common procedure to strengthen...

A common procedure to strengthen the overall header and prevent a tube/flange junction leak due to header flex or corrosion is to weld a bead around that area. To prevent warping the flange when heat is applied, a junk head is used as a fixture to mount the exhaust header. Header bolts are installed on the rear header tube and the other ports will receive one bolt each to keep the header flat. The junction will be welded using a Miller Synchrowave 350 TIG welder. The 220-volt, three-phase welder is set to 200 amps and a 3/32-inch mild steel welding rod is used. Welding begins in a counter-clockwise manner, with the junction closest to the outside header bolt being done first.

Welding continues around the...

Welding continues around the header until the inner-bolt is approached, which is too close to the tube to complete a weld, so it is momentarily removed. After completion, the bolt is put back in and the welding continues until there is a nice bead around the entire tube.

Normally, all pipes would...

Normally, all pipes would be TIG welded in a similar manner, the header would be sandblasted, and high-temp paint would be applied to protect the metal. However, we demonstrated the process on a single tube, as this pair of headers would require an impractical amount work to repair and strengthen when compared to simply replacing them with a different set.

A cylinder-head slice is used...

A cylinder-head slice is used to demonstrate a center-port alignment issue. Note the metal being scribed on the center port. Although it isn't visible in this shot, if the center runners' divider is aligned improperly, it is very common to have to grind the excess material off of one side and then braze brass onto the opposing side to "relocate" the divider into the center of the exhaust-port opening. The procedure to grind and braze is identical to what was demonstrated. The most common alignment problem with headers is the center port!