Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I'm working on creating an image gallery with just the index.php
The users can switch between images by using "next" or "previous" buttons.
Is this healthy for the server ?
Does this method harm SEO as no html pages really exist except for a blank template. ( All the SEO related data are in the mysql DB)
Thanks in advance.
The practice of having a single page website will not by default harm your site's page rank, although it does add some issues.
Only one URL - usually sites have /about, /contact, /gallery, /we'r'awesome, etc. You get one. (You could use hash tags as a practical workaround, but this wont do much for SEO - if you designate each hash tag as unique content and it all points to one page of the same content, this can actually hurt you)
Best SEO practice is to have one set of content/keywords per page. With a one page sit, you only get one go at it.
Additionally, a single page may take longer to load (depending how you set it up), and be less intuitive to navigate (gain, depending how it's set up).
Check out this article for some more points.
Yes it can harm SEO, but a lot of things can so that should be the last thing you focus on since Google is all that matters now and it changes often.
You can fix that by adding "tutorial" and "about" pages and what not anyways.
Healthy for the server depends on your code and the server and the amount of visitors and how you store the images etc etc etc etc.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 4 years ago.
Improve this question
So my company has a huge website with over 7000 static pages. I have been tasked with creating a new website and attempting to account for all of the content. One way in which I've been able to do that, is by using a hash in the url to direct an AJAX call to pull content in dynamically. While this has effectively been able to eliminate many of the pages, I've been concerned with losing the site's SEO rankings, hence: redirects.
Since the new URL's have the potential to become complex (not to mention they all have a hash symbol in them), I came across one user's answer on here on how one might implement a 301 to point to a "redirector.php" and then create a php formula to point the user to the final destination. (https://stackoverflow.com/a/1279955/2005787)
This method has been working beautifully, however, my main concern is that by redirecting someone to a "redirector.php" file, you are losing all of your SEO rankings, since the final location is two steps removed from the original address.
So first, can I implement the "redirector.php" method without destroying my SEO rankings?
Second, if the "redirector.php" method does, in fact, hurt my rankings, then is there an alternative way to generate complicated redirects?
Thank you!
Ideally you would just have one redirect. Though Google will follow more than one and suggests 2. Maximum 3. So you could be okay with your plan.
https://youtu.be/r1lVPrYoBkA
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am currently building a portfolio website. I'd like for it to be only one page if accessed from a desktop computer (and tablet), but multiple pages via mobile browsers (phone).
I intend to do this because the content I have is too little to be on separate pages on desktop, but too much on one page for mobile (therefore increasing the reluctancy of user to go through until the end).
I believe this can be achieve with PHP? But as I'm not familiar with the language, I am not able to actually write the code.
What I'm looking for basically is this:
if [browser width is more than X pixels]
[includes a file with the whole page html here],
else
[includes a file with one page coding]
EDITED
My question: is it possible to do this with PHP? I am using responsive design but would like to still achieve the above (separate pages on mobile). Are there any methods other than PHP and directing the user to something like mobile.domain.com?
To try to actually answer the question, this should get you started. There are a number of ways you can think about doing this.
1. Serve different sites for Mobile vs Desktop
By detecting the user agent, it's possible to redirect users to different pages that are more appropriate for their devices. This was great about 10 years ago when you didn't have too many different devices to worry about. These day's it's not very practical.
2. Responsive design
This is a slightly different way of thinking. Rather than showing different devices different information, you show them the same information and use CSS to format it to suite their screen. Notice, this is not about devices, but about screen size. This can be achieved through CSS media queries.
There are probably other ways to do it too, these are the main two I can think of. I prefer the second method, but there are occasionally reasons to use the first.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have video website and I worry about if somebody write a script that fetches all my database and use it because i use the video id in address as query string for saying every page which video have to be shown.
Example:
http://example.com/video/215/videotitle
215 is my video id and videotitle is the title of my video, i want to have something like youtube:
www.youtube.com/watch?v=__zj6ibrq04
How can I do this?
i should mention that I used mod_rewrite to get an address like this so I absolutely worry about somebody fetching my database because they can know the video id.
That's awful because id is an auto increment primary key in my database!!!
Is there any suggestion?
If all your pages are public, i.e. anyone can go to any site at any time, there's only one thing you can do against a bot automatically scraping your site: detect scraping behaviour and throttle it. That means you need to track every visitor by IP address and/or other characteristics and start denying them access once they start requesting too many pages within a certain time window. No, this is not trivial to get right.
In this case it doesn't really matter what your URLs look like; you may think that YouTube's URLs are "unguessable", but (most of) YouTube's videos are entirely public and can be discovered by browsing through YouTube's front page. There's no need to guess the URL, that's an irrelevant detail. And even if they were not, you could simply start trying every single URL from __aaaaaaaa trough __9999999. It'll take a while, but it's possible.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm new to using php (and its been I while since I've coded) ... but anyway, I want to create a website that uses two languages.
I've been reading up on google's best practices (Multi-regional and multilingual sites), but I'm yet to find something that can help me with the actual development.
The site will contain at least 30 pages and need to be compatible with all the major browsers.
Really appreciate some advice on this. At the moment I don't no whether to create a page for each language (because lang='' doesn't appear to be compatible with all browsers), or hide and show div's on page load or dynamically load the content with php ... what is the best practice?
Apologies if this is a little generic ...
Thank you in advance!
create a page for each language
This is sensible.
(because lang='' doesn't appear to be compatible with all browsers),
Browsers don't generally need to care what language the page is written in. They just need to display the content to the user, so that doesn't matter.
Some screen readers might look at lang to determine which pronunciation guide to use, but few other tools used directly by humans will care.
Language can influence which character encoding you use (although in most cases the answer is "Just use UTF-8"), but that is specified independently of the lang attribute.
or hide and show div's on page load
This sounds like you will have a page that just jumps between languages, unless JavaScript is available in which case some of it will be hidden from the user. I wouldn't do that. Have sensible documents.
or dynamically load the content with php
Dynamically generating the content server side is one way to produce pages in multiple languages. It is still sensible to give them independent URIs so users can link to specific ones.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I've got a site that is based around a contact form. This form is generated according to the variables passed in the URL, and the information passed is put in headers in the body, and also in the title. Additionally images are customized, so basically the whole content is changed according to these variables.
So I've run a sitemap generator, and it's actually generated lots of these www.site.tld/me.php?a=hi&b=pie, www.site.tld/me.php?a=hi&b=chocolate, www.site.tld/me.php?c=hi&hello.... you get the point.
So, my question is: is it smart to use this to my advantage, include these in the sitemap and customize them for SEO, or should I just ignore it and omit it from the sitemap?
In general having dynamic urls is okay, but you don't necessarily want them indexed for SEO purposes. In general its better to have a well organized url structure, as its seen to be more appealing. (i.e. site.com/article/sports/baseball123 is better than site.com?id=123433). So depending on your content (whether its static or dynamic) you may want to move to that type of a url structure, and have your pages indexed. On the other hand if you need to keep dynamic urls (for some reason) and depending on the nature of the content, it may be best to leave them out of the equation from an SEO perspective. It ultimately comes down to what you're serving from these pages.
Search engine friendly urls by using apache rewrite module search apache mod_rewrite in google there are many ways to do this and there are some ways that work much better than others. Google will index your site based on the content on the page rather than the url or any meta information. Using the mod rewrite makes it easier for your viewers but as far as search engines are concerned it dont really matter. Hope this helps