Open 301 permanent move in new window

#1010268
  • Resolved Joel Glanzmann
    Rank Math free

    Hello team

    I want to redirect a post directly to a PDF link. Therefore I would like to open it in a new window. How could I achieve that?

    Best regards,
    Joel

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    We apologize for the issue you are facing. To redirect a post to a PDF link and have it open in a new window, you can follow these steps:

    1. Create a 301 Redirect: First, you need to set up a 301 redirect for your post to the PDF link. You can do this by going to Rank Math SEO → Redirections in your WordPress dashboard. Click on Add New and enter the old URL in the Source URL field and the PDF link in the Destination URL field. Make sure to select 301 Permanent Move as the redirection type.

      create new redirection rule

    2. Open in New Window: Unfortunately, the 301 redirect itself does not have an option to open links in a new window. However, you can manually add a link to your post that opens the PDF in a new tab. To do this, when you add the link in your post editor, use the target="_blank" attribute in the HTML code of the link. This will ensure that when users click on the link, it opens in a new tab.

    If you need further assistance or if there are any technical issues on your site, please reply to this ticket with your site URL, and a human agent from our support team will assist you further.

    Thank you for raising this concern!

    Sources:
    301 vs 302 Redirect: Which One Should You Use? » Rank Math

    Hi there

    Thank you for your reply.

    What I want to achieve is that I create a post without content (only title). Then I would like to integrate to post title into the homepage, but when a user clicks on the post, the PDF should be visible instead of the post. I thought the only way to achieve that would be a redirect to the pdf. Or would you have another idea?

    Best regards,
    Joel

    Hello,

    Thank you for contacting us.

    When using a 301 redirect, the redirection occurs at the server level, so we cannot force a browser to open the target (in your case, the PDF) in a new window. The behavior of a 301 redirect is determined by the browser, which simply follows the redirect.

    If you want the PDF to open in a new window, you could instead remove the redirect and place a link within your post with a target=”_blank” attribute. This way, when users click the link, the PDF will open in a new window or tab as desired.

    Hope that helps, and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Open 301 permanent move in new window’ is closed to new replies.