Problem with external links

Discussion in 'WordPress' started by korfezli1966, Oct 24, 2013.

  1. #1
    Hi,

    In my content there are external links for example: http:// www, externalwebsite, com, and if I add them into my content with http;//, then when I click on the link, I can land on the external website.

    But whenever I add a link without http;//www, only externalwebsite,com, then I am landing on http;//www, mywebsite, com/externalwebsite,com/, which is a 404 page.

    Because of this problem, I am receiving error reports on google webmastertools and therefore my websites rank decreased.

    How can I configure it so, so that if a link does not have any http:// at the beginning can still go to the externalwebsite?

    Thanks for your help!
     
    korfezli1966, Oct 24, 2013 IP
  2. korfezli1966

    korfezli1966 Well-Known Member

    Messages:
    289
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    165
    Digital Goods:
    1
    #2
    Sorry I could not open a topic with writing h t t p : / / www externalwebsite com , because DP tries to connect that server but can not find and I can not open a topic because of this... So stupid....
     
    korfezli1966, Oct 24, 2013 IP
  3. korfezli1966

    korfezli1966 Well-Known Member

    Messages:
    289
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    165
    Digital Goods:
    1
    #3
    Anyone? Help?
     
    korfezli1966, Oct 25, 2013 IP
  4. PixelFrau

    PixelFrau Greenhorn

    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #4
    The h t t p:// is what tells the web browser it needs to look for the link on the Internet. That's why when you don't include h t t p://, the web browser tries to find that location on your website instead of somewhere else online. Use the reports from Google Webmaster Tools to see where the incorrect links are on your site, then fix them by adding h t t p:// .
     
    PixelFrau, Oct 28, 2013 IP
    korfezli1966 likes this.
  5. korfezli1966

    korfezli1966 Well-Known Member

    Messages:
    289
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    165
    Digital Goods:
    1
    #5
    Actually I am collecting data like a directory, the links are almost on every post which are around 10k on my website. That is why I need some how chnge something in the source code.
     
    korfezli1966, Oct 28, 2013 IP
  6. gregdbowen`

    gregdbowen` Member

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #6
    You can preform a search and replace, but be really careful and backup everything. given:
    <a href="web.com">link</a>
    Code (markup):
    replace
    <a href="
    Code (markup):
    with
    <a href="http://www.
    Code (markup):
    If there are other links on your page that already have the
    http://
    Code (markup):
    you can do a selective search and replace for specific sections of your page.
     
    gregdbowen`, Oct 28, 2013 IP
    korfezli1966 likes this.
  7. korfezli1966

    korfezli1966 Well-Known Member

    Messages:
    289
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    165
    Digital Goods:
    1
    #7
    Search and replace what? I am pulling the content from other websites, and I actually have to change something in the source code of the wp, so that it should just add http:// to the links after clicking on them.
     
    korfezli1966, Oct 28, 2013 IP
  8. Nick Gomez

    Nick Gomez Greenhorn

    Messages:
    70
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    13
    #8
    The links are stored in the posts in the database. To search and replace this across all of the posts, you will have to make changes at the database level. You will have to:
    1) Login to your webhost control panel, usually called cPanel
    2) Go down to Databases, and launch phpMyAdmin
    3) Select the database for the blog
    4) Browse the table for the posts (usually called wp_posts)
    5) The post data is usually stored in post_content - review the link that is stored in sql - SELECT `post_content` FROM `wp_posts`(for each row in the table). To test you can use the Limit clause
    6) You will have to execute a command to update the link "<a href=" with <a href=http://

    If this does not make any sense to you, then it might be wise to hire a mysql database person on oDesk to fix this for you
     
    Nick Gomez, Oct 31, 2013 IP
  9. korfezli1966

    korfezli1966 Well-Known Member

    Messages:
    289
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    165
    Digital Goods:
    1
    #9

    I know how to edit it, it makes sense to me, but the problem that nobody gets is that I am pulling content and the new added links will also have the same problem.

    Anyway I found a solution. Simply installed a plugin which redirects all 404 not found errors to the homepage, the problem is at least resolved.
     
    korfezli1966, Nov 1, 2013 IP
  10. Nick Gomez

    Nick Gomez Greenhorn

    Messages:
    70
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    13
    #10
    Nick Gomez, Nov 1, 2013 IP
    korfezli1966 likes this.
  11. korfezli1966

    korfezli1966 Well-Known Member

    Messages:
    289
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    165
    Digital Goods:
    1
    #11
    korfezli1966, Nov 1, 2013 IP