Jirasyon Posted July 18, 2018 Share Posted July 18, 2018 Hi, I am new at html and this forum. Sorry if this question asked before I prepared a website on my pc. While working on PC my image src code was working and code was like this: [src="C:\Users\Burak\Desktop\elc.jpg"] I've transfered my website(with FileZilla) to server and published it. The problem is FileZilla gives me the image adress as [src="ftp://ftp.mywebsitename.com/httpdocs/img/elc.jpg"] but when i put this adress in html code it is not working. I can't see any image. How should i get the right adress and use it? Thank you! Link to comment Share on other sites More sharing options...
dsonesuk Posted July 18, 2018 Share Posted July 18, 2018 Your default root folder is 'mywebsitename.com/httpdocs/' this is where all your website files are placed, entering 'mywebsitename.com' domain address in browser window address bar should take you directly to the root folder index file which will be your home page. Folders added to this root folder such as 'img' are accessed by adding that folder name to you domain website name i.e mywebsitename.com/img will take to that img folder, then by adding the file name 'elc.jpg' should access that image file i.e 'mywebsitename.com/img/etc.jpg'. 1 Link to comment Share on other sites More sharing options...
Jirasyon Posted July 18, 2018 Author Share Posted July 18, 2018 Link to comment Share on other sites More sharing options...
dsonesuk Posted July 18, 2018 Share Posted July 18, 2018 Like I said just by entering ' mywebsitename.com' domain refers to a folder called 'mywebsitename.com/httpdocs/' in the background, you don't need to enter 'httpdocs/' at all!. Anyone entering mywebsitename.com will is directed to 'mywebsitename.com/httpdocs/' folder because that is where all your website folders and files are placed. So replace all references to 'mywebsitename.com/httpdocs' with 'mywebsitename.com'. Also you should not use a ftp reference at all, that is a File Transfer Protocol used for you guessed it! FILE TRANSFER! it should be Hyper Text Transfer Protocol as in 'http://mywebsitename.com/img/elc.jpg' 1 Link to comment Share on other sites More sharing options...
Jirasyon Posted July 18, 2018 Author Share Posted July 18, 2018 Ok i tried without httpdocs an it worked. Thank you! Link to comment Share on other sites More sharing options...
davej Posted July 18, 2018 Share Posted July 18, 2018 Learn about relative paths... https://www.w3schools.com/htmL/html_filepaths.asp Also another common problem is that when testing on a Windows pc the paths and file names are not case-sensitive -- but then you transfer the file to a Linux server which is case-sensitive. 1 Link to comment Share on other sites More sharing options...
dsonesuk Posted July 18, 2018 Share Posted July 18, 2018 If you want a more SEO friendly site, its preferable to use absolute paths rather than relative. Link to comment Share on other sites More sharing options...
davej Posted July 18, 2018 Share Posted July 18, 2018 It seem like SEO is mostly voodoo. https://www.seroundtable.com/google-absolute-vs-relative-urls-26001.html Link to comment Share on other sites More sharing options...
Ingolme Posted July 18, 2018 Share Posted July 18, 2018 I see no advantage to using absolute URLS, for SEO or any other reason. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 19, 2018 Share Posted July 19, 2018 IF! everyone used relative paths correctly, and the site properly configured, then mostly they would be fine, except when it comes to situations like: 1) Your site has the potential to have 4 duplicate sites http://example.com http://www.example.com https://example.com https://www.example.com result: your SEO is diluted, images, page linked to, can be potentially linked to all but the correct link. 2) possible duplicate relative link to unrelated page that uses the same filename, but in in different sub folder 3) Canonical links won't function properly with a relative link 4) RSS feed links won't function properly with a relative link 5) Search bots have to determine the correct path to follow with relative links, instead of the correct path being already fully provided, causing impact the depth and how often they crawl the website. 6) Less chance of someone quickly copying website and using on a different domain. (hmmm... what tutorial site have we seen that happen to? several times) Link to comment Share on other sites More sharing options...
Ingolme Posted July 19, 2018 Share Posted July 19, 2018 1. Redirect all domains to the canonical site. If you're not doing that then you already have a bigger SEO problem. 2. Links relative to the site root do not have this issue. 3. Your backend software should be generating the absolute canonical links based on the current page URI. Yes, absolute URLs are used when the content of the tag will be converted to a link on another website, as in the case of OpenGraph and the canonical URL. 4. Your RSS feed should use the article's absolute URL for the same reason I described above. RSS feeds are not part of the website content and they should be generated by backend software. 5. That is not true. Search robots, like browsers, know exactly where they are and where they want to go. They're not human, so calculating URLs does not make them tired. 6. It takes 5 minutes to build a script to translate relative URLs. If somebody wants to copy your site, they will. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 19, 2018 Share Posted July 19, 2018 Quote Any time you leave something up to the bots to decide, you're asking for trouble. Googlebot is extremely sophisticated, but it can still make mistakes when encountering any unusual circumstances involving relative URLs. Less-sophisticated bots are even more likely to get confused by relative links, even under typical circumstances. The only way to ensure that you've eliminated these uncertainties is by utilizing absolute URLs, and doing so consistently across the site. If bots including GOD's all sophisticated crawling Googlebot are constantly making mistakes involving relative urls, surly this is causing a inefficient crawling of these websites, using bandwidth which in turn causes overhead in budget cost, and if your site is inefficiently causing these issues using relative links, this must impact on the number of times your site is crawled and the number of valid links it will actually crawl if it is always coming across mistakes caused by using relative links. Link to comment Share on other sites More sharing options...
Ingolme Posted July 19, 2018 Share Posted July 19, 2018 Where are your sources? Link to comment Share on other sites More sharing options...
dsonesuk Posted July 20, 2018 Share Posted July 20, 2018 It was from someone who worked for Google SEO team, yeah I know what do they know. Link to comment Share on other sites More sharing options...
Ingolme Posted July 20, 2018 Share Posted July 20, 2018 I know a guy too. Anonymous sources cannot be trusted. You'll be hard pressed to find a top ranking site that doesn't use relative URLs. Link to comment Share on other sites More sharing options...
webtrickshome Posted July 24, 2018 Share Posted July 24, 2018 First of all you need to know where exactly is the image located on your server. Generally, it's placed in public_html/images and in your case it's public_html/img. So, you can use the image path as http://you-domain-name/img/your-file-name. It's always better to use the full path while embedding objects or files. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now